Deepak_commit_31_05_2018
This commit is contained in:
+17
-17
@@ -21,20 +21,20 @@ android {
|
||||
targetSdkVersion 22
|
||||
|
||||
//For Egypt
|
||||
/* versionCode 14
|
||||
/*versionCode 14
|
||||
versionName "2.6"*/
|
||||
|
||||
//For UAE
|
||||
versionCode 18
|
||||
versionName "3.0"
|
||||
/*versionCode 19
|
||||
versionName "3.1"*/
|
||||
|
||||
//For Turkey
|
||||
/* versionCode 15
|
||||
/*versionCode 15
|
||||
versionName "2.7"*/
|
||||
|
||||
//For KSA
|
||||
/* versionCode 18
|
||||
versionName "3.0"*/
|
||||
versionCode 19
|
||||
versionName "3.1"
|
||||
|
||||
|
||||
multiDexEnabled true
|
||||
@@ -53,9 +53,9 @@ dependencies {
|
||||
|
||||
//implementation 'com.google.firebase:firebase-crash:11.8.0'
|
||||
implementation 'com.google.firebase:firebase-messaging:11.8.0'
|
||||
compile fileTree(dir: 'libs', include: ['*.jar'])
|
||||
compile files('libs/ksoap2-android-assembly-3.6.2-jar-with-dependencies.jar')
|
||||
androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
|
||||
implementation fileTree(dir: 'libs', include: ['*.jar'])
|
||||
implementation files('libs/ksoap2-android-assembly-3.6.2-jar-with-dependencies.jar')
|
||||
androidTestImplementation('com.android.support.test.espresso:espresso-core:2.2.2', {
|
||||
exclude group: 'com.android.support', module: 'support-annotations'
|
||||
})
|
||||
|
||||
@@ -65,21 +65,21 @@ dependencies {
|
||||
implementation 'com.android.support:cardview-v7:26.1.0'
|
||||
implementation 'com.android.support:recyclerview-v7:26.1.0'
|
||||
|
||||
compile 'com.google.code.gson:gson:2.7'
|
||||
compile 'com.android.support.constraint:constraint-layout:1.0.0-alpha4'
|
||||
implementation 'com.google.code.gson:gson:2.7'
|
||||
implementation 'com.android.support.constraint:constraint-layout:1.0.0-alpha4'
|
||||
|
||||
compile 'com.squareup.retrofit:converter-gson:2.0.0-beta1'
|
||||
implementation 'com.squareup.retrofit:converter-gson:2.0.0-beta1'
|
||||
implementation 'com.google.android.gms:play-services-location:11.8.0'
|
||||
implementation 'com.google.android.gms:play-services-maps:11.8.0'
|
||||
compile 'com.google.firebase:firebase-appindexing:11.8.0'
|
||||
compile 'com.google.firebase:firebase-perf:11.8.0'
|
||||
implementation 'com.google.firebase:firebase-appindexing:11.8.0'
|
||||
implementation 'com.google.firebase:firebase-perf:11.8.0'
|
||||
|
||||
compile('com.crashlytics.sdk.android:crashlytics:2.7.1@aar') {
|
||||
implementation('com.crashlytics.sdk.android:crashlytics:2.7.1@aar') {
|
||||
transitive = true;
|
||||
}
|
||||
compile 'com.google.firebase:firebase-core:11.8.0'
|
||||
implementation 'com.google.firebase:firebase-core:11.8.0'
|
||||
|
||||
testCompile 'junit:junit:4.12'
|
||||
testImplementation 'junit:junit:4.12'
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -52,6 +52,7 @@ import cpm.com.gskmtorange.xmlGetterSetter.MappingPromotionGetterSetter;
|
||||
import cpm.com.gskmtorange.xmlGetterSetter.MappingStockGetterSetter;
|
||||
import cpm.com.gskmtorange.xmlGetterSetter.MappingSubCategoryImageAllowGetterSetter;
|
||||
import cpm.com.gskmtorange.xmlGetterSetter.NoCameraDataGetterSetter;
|
||||
import cpm.com.gskmtorange.xmlGetterSetter.NoCameraLastVisitGetterSetter;
|
||||
import cpm.com.gskmtorange.xmlGetterSetter.NonT2pReasonGetterSetter;
|
||||
import cpm.com.gskmtorange.xmlGetterSetter.NonWorkingReasonGetterSetter;
|
||||
import cpm.com.gskmtorange.xmlGetterSetter.POGGetterSetter;
|
||||
@@ -76,7 +77,7 @@ import cpm.com.gskmtorange.xmlGetterSetter.TableBean;
|
||||
*/
|
||||
|
||||
public class GSKOrangeDB extends SQLiteOpenHelper {
|
||||
public static final String DATABASE_NAME = "GSK_ORANGE_DB30";
|
||||
public static final String DATABASE_NAME = "GSK_ORANGE_DB31";
|
||||
public static final int DATABASE_VERSION = 15;
|
||||
TableBean tableBean;
|
||||
private SQLiteDatabase db;
|
||||
@@ -172,6 +173,7 @@ public class GSKOrangeDB extends SQLiteOpenHelper {
|
||||
db.execSQL(TableBean.getTable_POG_QUESTION());
|
||||
db.execSQL(TableBean.getTable_NON_T2P_REASON());
|
||||
db.execSQL(TableBean.getTable_CONFIGURATION_COUNTRY_WISE());
|
||||
db.execSQL(TableBean.getTable_NO_CAMERA_LAST_VISIT_DATA());
|
||||
|
||||
//15-03-2017
|
||||
db.execSQL(CommonString.CREATE_TABLE_INSERT_MSL_AVAILABILITY_STOCK_FACING);
|
||||
@@ -191,7 +193,7 @@ public class GSKOrangeDB extends SQLiteOpenHelper {
|
||||
db.execSQL("DROP TABLE IF EXISTS " + TableBean.getJourneyPlan());
|
||||
}
|
||||
|
||||
public void createTable(String table_query){
|
||||
public void createTable(String table_query) {
|
||||
db.execSQL(table_query);
|
||||
}
|
||||
|
||||
@@ -517,7 +519,7 @@ public class GSKOrangeDB extends SQLiteOpenHelper {
|
||||
Cursor dbcursor = null;
|
||||
|
||||
try {
|
||||
dbcursor = db.rawQuery("SELECT * from "+ table_name +
|
||||
dbcursor = db.rawQuery("SELECT * from " + table_name +
|
||||
" where VISIT_DATE ='" + date + "' ORDER BY VISIT_ORDER", null);
|
||||
|
||||
if (dbcursor != null) {
|
||||
@@ -800,12 +802,11 @@ public class GSKOrangeDB extends SQLiteOpenHelper {
|
||||
|
||||
try {
|
||||
|
||||
if(flag_from!=null){
|
||||
if (flag_from != null) {
|
||||
dbcursor = db.rawQuery("SELECT * from " + CommonString.TABLE_COVERAGE_DATA + " where "
|
||||
+ CommonString.KEY_VISIT_DATE + "='" + visitdate + "' AND "+CommonString.KEY_STORE_FLAG + "='"+ flag_from +"'",
|
||||
+ CommonString.KEY_VISIT_DATE + "='" + visitdate + "' AND " + CommonString.KEY_STORE_FLAG + "='" + flag_from + "'",
|
||||
null);
|
||||
}
|
||||
else {
|
||||
} else {
|
||||
dbcursor = db.rawQuery("SELECT * from " + CommonString.TABLE_COVERAGE_DATA + " where "
|
||||
+ CommonString.KEY_VISIT_DATE + "='" + visitdate + "'",
|
||||
null);
|
||||
@@ -1896,10 +1897,9 @@ public class GSKOrangeDB extends SQLiteOpenHelper {
|
||||
|
||||
String table;
|
||||
|
||||
if(flag_from.equals(CommonString.FROM_JCP)){
|
||||
if (flag_from.equals(CommonString.FROM_JCP)) {
|
||||
table = CommonString.KEY_JOURNEY_PLAN;
|
||||
}
|
||||
else {
|
||||
} else {
|
||||
table = CommonString.KEY_ADHOC_JOURNEY_PLAN;
|
||||
}
|
||||
|
||||
@@ -1922,21 +1922,19 @@ public class GSKOrangeDB extends SQLiteOpenHelper {
|
||||
Cursor dbcursor = null;
|
||||
String table;
|
||||
|
||||
if(flag_from!=null){
|
||||
if(flag_from.equals(CommonString.FROM_JCP)){
|
||||
if (flag_from != null) {
|
||||
if (flag_from.equals(CommonString.FROM_JCP)) {
|
||||
table = CommonString.KEY_JOURNEY_PLAN;
|
||||
}
|
||||
else {
|
||||
} else {
|
||||
table = CommonString.KEY_ADHOC_JOURNEY_PLAN;
|
||||
}
|
||||
}
|
||||
else {
|
||||
} else {
|
||||
table = CommonString.KEY_JOURNEY_PLAN;
|
||||
}
|
||||
|
||||
try {
|
||||
|
||||
dbcursor = db.rawQuery("SELECT * from "+ table +
|
||||
dbcursor = db.rawQuery("SELECT * from " + table +
|
||||
" where VISIT_DATE ='" + date + "' AND STORE_ID='" + store_id + "'", null);
|
||||
|
||||
|
||||
@@ -5384,6 +5382,7 @@ public class GSKOrangeDB extends SQLiteOpenHelper {
|
||||
cd.setRow_no(Integer.parseInt(dbcursor.getString(dbcursor.getColumnIndexOrThrow(CommonString.KEY_ROW_NO))));
|
||||
cd.setColumn_no(Integer.parseInt(dbcursor.getString(dbcursor.getColumnIndexOrThrow(CommonString.KEY_COLUMN_NO))));
|
||||
cd.setFacing(Integer.parseInt(dbcursor.getString(dbcursor.getColumnIndexOrThrow(CommonString.KEY_FACING))));
|
||||
cd.setVertical(dbcursor.getInt(dbcursor.getColumnIndexOrThrow(CommonString.KEY_ISVERTICAL))==1);
|
||||
|
||||
list.add(cd);
|
||||
dbcursor.moveToNext();
|
||||
@@ -5422,14 +5421,14 @@ public class GSKOrangeDB extends SQLiteOpenHelper {
|
||||
}
|
||||
|
||||
//get Row and column count no camera
|
||||
public ArrayList<RowColumnGetterSetter> getrowColumnNoCamera(String store_id, String category_id, String sub_category_id) {
|
||||
public ArrayList<RowColumnGetterSetter> getrowColumnNoCamera(String store_id, String category_id, String sub_category_id, String table_name) {
|
||||
|
||||
ArrayList<RowColumnGetterSetter> list = new ArrayList<>();
|
||||
Cursor dbcursor = null;
|
||||
|
||||
try {
|
||||
|
||||
dbcursor = db.rawQuery("SELECT ROW_NO, MAX(COLUMN_NO) as COLUMN_NO FROM NO_CAMERA_FACING_DATA WHERE " +
|
||||
dbcursor = db.rawQuery("SELECT ROW_NO, MAX(COLUMN_NO) as COLUMN_NO FROM "+ table_name + " WHERE " +
|
||||
"STORE_ID = '" + store_id + "' AND CATEGORY_ID = '" + category_id + "' AND SUB_CATEGORY_ID = '" + sub_category_id +
|
||||
"' GROUP BY ROW_NO", null);
|
||||
|
||||
@@ -5456,14 +5455,14 @@ public class GSKOrangeDB extends SQLiteOpenHelper {
|
||||
|
||||
//get Sub group master for sub category id , row and column
|
||||
|
||||
public NoCameraDataGetterSetter getRowSkuGroupCamera(String store_id, String category_id, String sub_category_id, int row, int column) {
|
||||
public NoCameraDataGetterSetter getRowSkuGroupCamera(String store_id, String category_id, String sub_category_id, int row, int column, String table_name) {
|
||||
|
||||
NoCameraDataGetterSetter column_data = new NoCameraDataGetterSetter();
|
||||
Cursor dbcursor = null;
|
||||
|
||||
try {
|
||||
|
||||
dbcursor = db.rawQuery("SELECT NC.SKU_GROUP_ID, SM.SKUGROUP_NAME, NC.FACING, NC.ISVERTICAL FROM NO_CAMERA_FACING_DATA NC " +
|
||||
dbcursor = db.rawQuery("SELECT NC.SKU_GROUP_ID, SM.SKUGROUP_NAME, NC.FACING, NC.IS_VERTICAL FROM "+ table_name +" NC " +
|
||||
"INNER JOIN SKUGROUP_MASTER SM ON NC.SKU_GROUP_ID = SM.SKUGROUP_ID " +
|
||||
"WHERE NC.STORE_ID = '" + store_id + "' AND NC.CATEGORY_ID = '" + category_id + "' AND NC.SUB_CATEGORY_ID = '" + sub_category_id + "' AND ROW_NO = '"
|
||||
+ row + "' AND COLUMN_NO = '" + column + "'", null);
|
||||
@@ -5475,7 +5474,7 @@ public class GSKOrangeDB extends SQLiteOpenHelper {
|
||||
column_data.setSKUGROUP_ID(dbcursor.getString(dbcursor.getColumnIndexOrThrow("SKU_GROUP_ID")));
|
||||
column_data.setSKUGROUP_NAME(dbcursor.getString(dbcursor.getColumnIndexOrThrow("SKUGROUP_NAME")));
|
||||
column_data.setFacing(dbcursor.getInt(dbcursor.getColumnIndexOrThrow("FACING")));
|
||||
column_data.setVertical(dbcursor.getInt(dbcursor.getColumnIndexOrThrow("ISVERTICAL"))==1);
|
||||
column_data.setVertical(dbcursor.getInt(dbcursor.getColumnIndexOrThrow("IS_VERTICAL")) == 1);
|
||||
|
||||
dbcursor.moveToNext();
|
||||
}
|
||||
@@ -5635,7 +5634,7 @@ public class GSKOrangeDB extends SQLiteOpenHelper {
|
||||
|
||||
try {
|
||||
|
||||
cursordata = db.rawQuery("Select DISTINCT QUESTION ,QUESTION_ID, ANSWER_TYPE, KEYACCOUNT_ID from ADDITIONAL_QUESTION " + "where CATEGORY_ID ='" + categoryId + "' AND STORETYPE_ID='"+ store_type_id +"'", null);
|
||||
cursordata = db.rawQuery("Select DISTINCT QUESTION ,QUESTION_ID, ANSWER_TYPE, KEYACCOUNT_ID from ADDITIONAL_QUESTION " + "where CATEGORY_ID ='" + categoryId + "' AND STORETYPE_ID='" + store_type_id + "'", null);
|
||||
|
||||
if (cursordata != null) {
|
||||
cursordata.moveToFirst();
|
||||
@@ -5677,7 +5676,7 @@ public class GSKOrangeDB extends SQLiteOpenHelper {
|
||||
|
||||
try {
|
||||
dbcursor = db.rawQuery("Select * from ADDITIONAL_QUESTION " +
|
||||
"where QUESTION_ID='" + question_id + "' AND CATEGORY_ID ='" + categoryId + "' AND STORETYPE_ID='"+ store_type_id +"'", null);
|
||||
"where QUESTION_ID='" + question_id + "' AND CATEGORY_ID ='" + categoryId + "' AND STORETYPE_ID='" + store_type_id + "'", null);
|
||||
|
||||
if (dbcursor != null) {
|
||||
dbcursor.moveToFirst();
|
||||
@@ -5901,14 +5900,14 @@ public class GSKOrangeDB extends SQLiteOpenHelper {
|
||||
//save audit insert data
|
||||
public void savePOGQuestionAnswerData(HashMap<MSL_AvailabilityStockFacingGetterSetter, List<POGGetterSetter>> hashMapListChildData,
|
||||
List<MSL_AvailabilityStockFacingGetterSetter> headerDataList,
|
||||
String store_cd, String category_cd) {
|
||||
String store_cd, String category_cd) {
|
||||
db.delete(CommonString.TABLE_POG_DATA_SAVE, "STORE_CD" + "='" + store_cd + "' AND CATEGORY_ID ='"
|
||||
+ category_cd + "'", null);
|
||||
|
||||
ContentValues values = new ContentValues();
|
||||
try {
|
||||
|
||||
for(int l=0; l<headerDataList.size(); l++){
|
||||
for (int l = 0; l < headerDataList.size(); l++) {
|
||||
List<POGGetterSetter> childList = hashMapListChildData.get(headerDataList.get(l));
|
||||
for (int i = 0; i < childList.size(); i++) {
|
||||
POGGetterSetter data = childList.get(i);
|
||||
@@ -5966,7 +5965,7 @@ public class GSKOrangeDB extends SQLiteOpenHelper {
|
||||
Cursor dbcursor = null;
|
||||
try {
|
||||
dbcursor = db.rawQuery("Select * " + "From " + CommonString.TABLE_POG_DATA_SAVE
|
||||
+ " where STORE_CD='" + store_cd + "' AND CATEGORY_ID ='" + category_id + "' AND SUB_CATEGORY_ID ='" + sub_category_id +"'", null);
|
||||
+ " where STORE_CD='" + store_cd + "' AND CATEGORY_ID ='" + category_id + "' AND SUB_CATEGORY_ID ='" + sub_category_id + "'", null);
|
||||
|
||||
if (dbcursor != null) {
|
||||
dbcursor.moveToFirst();
|
||||
@@ -6176,12 +6175,11 @@ public class GSKOrangeDB extends SQLiteOpenHelper {
|
||||
|
||||
values.put("RECEIVER", data.getRECEIVER().get(i));*/
|
||||
|
||||
try{
|
||||
try {
|
||||
values.put("COMMENTDATE", data.getCOMMENTDATE().get(i));
|
||||
|
||||
values.put("COMMENT", data.getCOMMENT().get(i));
|
||||
}
|
||||
catch (IndexOutOfBoundsException e){
|
||||
} catch (IndexOutOfBoundsException e) {
|
||||
System.out.println(e.toString());
|
||||
}
|
||||
|
||||
@@ -6207,7 +6205,7 @@ public class GSKOrangeDB extends SQLiteOpenHelper {
|
||||
|
||||
try {
|
||||
//dbcursor = db.rawQuery("SELECT DISTINCT CHAT_ID, MESSAGE, MESSAGEDATE, SENDERID, SENDER, STOREID FROM CHAT_MESSAGE WHERE STOREID='" + store_id +"' ORDER BY ORDERID", null);
|
||||
dbcursor = db.rawQuery("SELECT DISTINCT CHAT_ID, MESSAGE, MESSAGEDATE, STOREID FROM CHAT_MESSAGE WHERE STOREID='" + store_id +"' ORDER BY ORDERID", null);
|
||||
dbcursor = db.rawQuery("SELECT DISTINCT CHAT_ID, MESSAGE, MESSAGEDATE, STOREID FROM CHAT_MESSAGE WHERE STOREID='" + store_id + "' ORDER BY ORDERID", null);
|
||||
|
||||
if (dbcursor != null) {
|
||||
dbcursor.moveToFirst();
|
||||
@@ -6243,7 +6241,7 @@ public class GSKOrangeDB extends SQLiteOpenHelper {
|
||||
Cursor dbcursor = null;
|
||||
|
||||
try {
|
||||
dbcursor = db.rawQuery("SELECT CHAT_ID, MESSAGE, MESSAGEDATE, SENDERID, SENDER, STOREID, COMMENTDATE, COMMENT, SENDER_USERID FROM CHAT_MESSAGE WHERE STOREID='" + store_id +"' AND CHAT_ID ='"+ chat_id +"' AND COMMENT <>'' ORDER BY ORDERID", null);
|
||||
dbcursor = db.rawQuery("SELECT CHAT_ID, MESSAGE, MESSAGEDATE, SENDERID, SENDER, STOREID, COMMENTDATE, COMMENT, SENDER_USERID FROM CHAT_MESSAGE WHERE STOREID='" + store_id + "' AND CHAT_ID ='" + chat_id + "' AND COMMENT <>'' ORDER BY ORDERID", null);
|
||||
|
||||
if (dbcursor != null) {
|
||||
dbcursor.moveToFirst();
|
||||
@@ -6298,7 +6296,7 @@ public class GSKOrangeDB extends SQLiteOpenHelper {
|
||||
Cursor dbcursor = null;
|
||||
|
||||
try {
|
||||
dbcursor = db.rawQuery("SELECT * FROM CONFIGURATION_COUNTRY_WISE WHERE COUNTRY_ID='" + country_id +"'", null);
|
||||
dbcursor = db.rawQuery("SELECT * FROM CONFIGURATION_COUNTRY_WISE WHERE COUNTRY_ID='" + country_id + "'", null);
|
||||
|
||||
if (dbcursor != null) {
|
||||
dbcursor.moveToFirst();
|
||||
@@ -6320,4 +6318,69 @@ public class GSKOrangeDB extends SQLiteOpenHelper {
|
||||
}
|
||||
return list;
|
||||
}
|
||||
|
||||
//NO_CAMERA_LAST_VISIT_DATA
|
||||
public void InsertNO_CAMERA_LAST_VISIT_DATA(NoCameraLastVisitGetterSetter data) {
|
||||
db.delete("NO_CAMERA_LAST_VISIT_DATA", null, null);
|
||||
|
||||
ContentValues values = new ContentValues();
|
||||
try {
|
||||
for (int i = 0; i < data.getSKUGROUP_ID().size(); i++) {
|
||||
|
||||
values.put("MID", data.getMID().get(i));
|
||||
values.put("STORE_ID", data.getSTORE_ID().get(i));
|
||||
values.put("VISIT_DATE", data.getVISIT_DATE().get(i));
|
||||
values.put("CATEGORY_ID", data.getCATEGORY_ID().get(i));
|
||||
values.put("SUB_CATEGORY_ID", data.getSUB_CATEGORY_ID().get(i));
|
||||
values.put("SKU_GROUP_ID", data.getSKUGROUP_ID().get(i));
|
||||
values.put("ROW_NO", data.getROW_NO().get(i));
|
||||
values.put("COLUMN_NO", data.getCOLUMN_NO().get(i));
|
||||
values.put("FACING", data.getFACING().get(i));
|
||||
values.put("IS_VERTICAL", data.getIS_VERTICAL().get(i));
|
||||
|
||||
db.insert("NO_CAMERA_LAST_VISIT_DATA", null, values);
|
||||
}
|
||||
} catch (Exception ex) {
|
||||
Log.d("Exception ", " in NO_CAMERA_LAST_VISIT_DATA " + ex.toString());
|
||||
}
|
||||
}
|
||||
|
||||
//get no camera category drag drop
|
||||
//get for specific sub category id
|
||||
public ArrayList<NoCameraDataGetterSetter> getNoCameraLastVisitCategoryData(
|
||||
String store_id, String category_id, String subcategory_id) {
|
||||
|
||||
ArrayList<NoCameraDataGetterSetter> list = new ArrayList<>();
|
||||
Cursor dbcursor = null;
|
||||
|
||||
try {
|
||||
|
||||
dbcursor = db.rawQuery("SELECT * FROM NO_CAMERA_LAST_VISIT_DATA WHERE " + CommonString.KEY_STORE_ID + " = '" + store_id
|
||||
+ "' AND " + CommonString.KEY_CATEGORY_ID + " ='" + category_id
|
||||
+ "' AND " + CommonString.KEY_SUB_CATEGORY_ID + " ='" + subcategory_id + "'", null);
|
||||
|
||||
if (dbcursor != null) {
|
||||
dbcursor.moveToFirst();
|
||||
while (!dbcursor.isAfterLast()) {
|
||||
NoCameraDataGetterSetter cd = new NoCameraDataGetterSetter();
|
||||
|
||||
cd.setSKUGROUP_ID(dbcursor.getInt(dbcursor.getColumnIndexOrThrow(CommonString.KEY_SKU_GROUP_ID)) + "");
|
||||
cd.setRow_no(dbcursor.getInt(dbcursor.getColumnIndexOrThrow(CommonString.KEY_ROW_NO)));
|
||||
cd.setColumn_no(dbcursor.getInt(dbcursor.getColumnIndexOrThrow(CommonString.KEY_COLUMN_NO)));
|
||||
cd.setFacing(dbcursor.getInt(dbcursor.getColumnIndexOrThrow(CommonString.KEY_FACING)));
|
||||
|
||||
list.add(cd);
|
||||
dbcursor.moveToNext();
|
||||
|
||||
}
|
||||
dbcursor.close();
|
||||
return list;
|
||||
}
|
||||
} catch (Exception e) {
|
||||
Log.d("Exception ", "get MSL_AvailabilityHeader!" + e.toString());
|
||||
return list;
|
||||
}
|
||||
return list;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -566,7 +566,6 @@ public class LoginActivity extends AppCompatActivity {
|
||||
editor.putString(CommonString.KEY_PATH, lgs.getAPP_PATH());
|
||||
editor.putString(CommonString.KEY_DATE, lgs.getCURRENTDATE());
|
||||
editor.putString(CommonString.KEY_COUNTRY_ID, lgs.getCOUNTRY_ID());
|
||||
//editor.putString(CommonString.KEY_DATE, "02/04/2018");
|
||||
|
||||
editor.commit();
|
||||
|
||||
@@ -666,13 +665,13 @@ public class LoginActivity extends AppCompatActivity {
|
||||
|
||||
CommonFunctions.updateLangResources(getApplicationContext(), preferences.getString(CommonString.KEY_LANGUAGE, ""));
|
||||
|
||||
/*Intent intent = new Intent(getBaseContext(),
|
||||
Intent intent = new Intent(getBaseContext(),
|
||||
MainActivity.class);
|
||||
startActivity(intent);
|
||||
|
||||
finish();*/
|
||||
finish();
|
||||
|
||||
uploadPreviousImages();
|
||||
//uploadPreviousImages();
|
||||
|
||||
}
|
||||
|
||||
@@ -752,7 +751,7 @@ public class LoginActivity extends AppCompatActivity {
|
||||
|
||||
public void uploadPreviousImages(){
|
||||
try {
|
||||
File f = new File(CommonString.FILE_PATH_OLD);
|
||||
File f = new File(CommonString.FILE_PATH);
|
||||
if(f!=null){
|
||||
File file[] = f.listFiles();
|
||||
if(file!=null && file.length>0){
|
||||
@@ -788,7 +787,7 @@ public class LoginActivity extends AppCompatActivity {
|
||||
if(file.length>0){
|
||||
UploadImageWithRetrofit.uploadedFiles = 0;
|
||||
UploadImageWithRetrofit.totalFiles = file.length;
|
||||
UploadImageWithRetrofit uploadImg = new UploadImageWithRetrofit( LoginActivity.this);
|
||||
UploadImageWithRetrofit uploadImg = new UploadImageWithRetrofit( "", userid,LoginActivity.this);
|
||||
uploadImg.UploadImageRecursive(LoginActivity.this);
|
||||
}
|
||||
else {
|
||||
|
||||
@@ -58,7 +58,8 @@ public class CommonFunctions {
|
||||
|
||||
public static String getCurrentTimeWithLanguage(Context context) {
|
||||
|
||||
SimpleDateFormat formatter = new SimpleDateFormat("HH:mm:ss"); Calendar m_cal = Calendar.getInstance();
|
||||
SimpleDateFormat formatter = new SimpleDateFormat("HH:mm:ss");
|
||||
Calendar m_cal = Calendar.getInstance();
|
||||
|
||||
String cdate = formatter.format(m_cal.getTime());
|
||||
SharedPreferences preferences = preferences = PreferenceManager.getDefaultSharedPreferences(context);;
|
||||
|
||||
@@ -852,7 +852,7 @@ public class CommonString {
|
||||
public static final String KEY_ROW_NO = "ROW_NO";
|
||||
public static final String KEY_COLUMN_NO = "COLUMN_NO";
|
||||
public static final String KEY_FACING = "FACING";
|
||||
public static final String KEY_ISVERTICAL = "ISVERTICAL";
|
||||
public static final String KEY_ISVERTICAL = "IS_VERTICAL";
|
||||
|
||||
public static final String CREATE_TABLE_INSERT_NO_CAMERA_FACING_DATA = "CREATE TABLE IF NOT EXISTS " + TABLE_INSERT_NO_CAMERA_FACING_DATA
|
||||
+ " ("
|
||||
|
||||
@@ -114,6 +114,12 @@ public class CreateSelfActivity extends AppCompatActivity {
|
||||
subCategory.setSub_category_id(sub_category_list.get(i).getSub_category_id());
|
||||
added_sub_category_list.add(subCategory);
|
||||
}
|
||||
else if(db.getNoCameraLastVisitCategoryData(store_id, categoryId, sub_category_list.get(i).getSub_category_id()).size()>0){
|
||||
MSL_AvailabilityStockFacingGetterSetter subCategory = new MSL_AvailabilityStockFacingGetterSetter();
|
||||
subCategory.setSub_category(sub_category_list.get(i).getSub_category());
|
||||
subCategory.setSub_category_id(sub_category_list.get(i).getSub_category_id());
|
||||
added_sub_category_list.add(subCategory);
|
||||
}
|
||||
}
|
||||
|
||||
if(added_sub_category_list.size()>0){
|
||||
|
||||
@@ -137,8 +137,15 @@ public class NoCameraActivity extends AppCompatActivity implements Listener {
|
||||
rvTop.setOnDragListener(topListAdapter.getDragInstance());
|
||||
|
||||
if (FROM == 1) {
|
||||
ArrayList<RowColumnGetterSetter> rows_data = db.getrowColumnNoCamera(store_id, categoryId, sub_category_data.getSub_category_id());
|
||||
String table_name = "NO_CAMERA_FACING_DATA";
|
||||
ArrayList<RowColumnGetterSetter> rows_data = db.getrowColumnNoCamera(store_id, categoryId, sub_category_data.getSub_category_id(), table_name);
|
||||
number_of_rows = rows_data.size();
|
||||
if(number_of_rows==0){
|
||||
table_name = "NO_CAMERA_LAST_VISIT_DATA";
|
||||
rows_data = db.getrowColumnNoCamera(store_id, categoryId, sub_category_data.getSub_category_id(), table_name);
|
||||
number_of_rows = rows_data.size();
|
||||
}
|
||||
|
||||
for (int i = 1; i <= rows_data.size(); i++) {
|
||||
|
||||
DynamycIdsGetterSetter dynamic_ids = new DynamycIdsGetterSetter();
|
||||
@@ -200,7 +207,7 @@ public class NoCameraActivity extends AppCompatActivity implements Listener {
|
||||
|
||||
for (int j = 1; j <= rows_data.get(i - 1).getColumn(); j++) {
|
||||
NoCameraDataGetterSetter column_data = new NoCameraDataGetterSetter();
|
||||
column_data = db.getRowSkuGroupCamera(store_id, categoryId, sub_category_data.getSub_category_id(), i, j);
|
||||
column_data = db.getRowSkuGroupCamera(store_id, categoryId, sub_category_data.getSub_category_id(), i, j, table_name);
|
||||
sku_group_master.add(column_data);
|
||||
}
|
||||
|
||||
@@ -838,7 +845,10 @@ public class NoCameraActivity extends AppCompatActivity implements Listener {
|
||||
for (int i = 0; i < ids.size(); i++) {
|
||||
List<NoCameraDataGetterSetter> customList = biglistMap.get(ids.get(i));
|
||||
|
||||
if(customList.size()>0 && !customList.get(0).getSKUGROUP_ID().equals("25")){
|
||||
if(customList.size()>0 && customList.get(0).getSKUGROUP_ID().equals("25")){
|
||||
|
||||
}
|
||||
else{
|
||||
|
||||
//if (customList.size() < max) {
|
||||
if (ids.get(i).getTotal_unit() < max) {
|
||||
|
||||
@@ -59,6 +59,7 @@ import cpm.com.gskmtorange.xmlGetterSetter.MappingPlanogramCountrywiseGetterSett
|
||||
import cpm.com.gskmtorange.xmlGetterSetter.MappingPromotionGetterSetter;
|
||||
import cpm.com.gskmtorange.xmlGetterSetter.MappingStockGetterSetter;
|
||||
import cpm.com.gskmtorange.xmlGetterSetter.MappingSubCategoryImageAllowGetterSetter;
|
||||
import cpm.com.gskmtorange.xmlGetterSetter.NoCameraLastVisitGetterSetter;
|
||||
import cpm.com.gskmtorange.xmlGetterSetter.NonT2pReasonGetterSetter;
|
||||
import cpm.com.gskmtorange.xmlGetterSetter.NonWorkingReasonGetterSetter;
|
||||
import cpm.com.gskmtorange.xmlGetterSetter.POGQuestionGetterSetter;
|
||||
@@ -103,6 +104,7 @@ public class DownloadActivity extends AppCompatActivity {
|
||||
POGQuestionGetterSetter pogQuestionGetterSetter;
|
||||
NonT2pReasonGetterSetter nonT2pReasonGetterSetter;
|
||||
ConfigurationContrywiseGetterSetter configurationContrywiseGetterSetter;
|
||||
NoCameraLastVisitGetterSetter noCameraLastVisitGetterSetter;
|
||||
|
||||
private Dialog dialog;
|
||||
private ProgressBar pb;
|
||||
@@ -201,10 +203,12 @@ public class DownloadActivity extends AppCompatActivity {
|
||||
|
||||
jcpgettersetter = XMLHandlers.JCPXMLHandler(xpp, eventType);
|
||||
|
||||
String jcpTable = jcpgettersetter.getTable_journey_plan();
|
||||
if(jcpTable!=null)
|
||||
TableBean.setJourneyPlan(jcpTable);
|
||||
|
||||
if (jcpgettersetter.getSTORE_ID().size() > 0) {
|
||||
resultHttp = CommonString.KEY_SUCCESS;
|
||||
String jcpTable = jcpgettersetter.getTable_journey_plan();
|
||||
TableBean.setJourneyPlan(jcpTable);
|
||||
} else {
|
||||
//return "JOURNEY_PLAN";
|
||||
no_jcp_flag = true;
|
||||
@@ -1114,6 +1118,39 @@ public class DownloadActivity extends AppCompatActivity {
|
||||
}
|
||||
publishProgress(data);
|
||||
|
||||
//NO_CAMERA_LAST_VISIT_DATA
|
||||
request = new SoapObject(CommonString.NAMESPACE, CommonString.METHOD_NAME_UNIVERSAL_DOWNLOAD);
|
||||
request.addProperty("UserName", userId);
|
||||
request.addProperty("Type", "NO_CAMERA_LAST_VISIT_DATA");
|
||||
request.addProperty("cultureid", culture_id);
|
||||
|
||||
envelope = new SoapSerializationEnvelope(SoapEnvelope.VER11);
|
||||
envelope.dotNet = true;
|
||||
envelope.setOutputSoapObject(request);
|
||||
|
||||
androidHttpTransport = new HttpTransportSE(CommonString.URL);
|
||||
androidHttpTransport.call(CommonString.SOAP_ACTION_UNIVERSAL, envelope);
|
||||
|
||||
result = envelope.getResponse();
|
||||
|
||||
if (result.toString() != null) {
|
||||
xpp.setInput(new StringReader(result.toString()));
|
||||
xpp.next();
|
||||
eventType = xpp.getEventType();
|
||||
noCameraLastVisitGetterSetter = XMLHandlers.noCameraLastVisitXMLHandler(xpp, eventType);
|
||||
|
||||
String table_no_camera = noCameraLastVisitGetterSetter.getTable_NO_CAMERA_LAST_VISIT_DATA();
|
||||
if (table_no_camera != null) {
|
||||
resultHttp = CommonString.KEY_SUCCESS;
|
||||
TableBean.setTable_NO_CAMERA_LAST_VISIT_DATA(table_no_camera);
|
||||
}
|
||||
|
||||
if (noCameraLastVisitGetterSetter.getSKUGROUP_ID().size() > 0) {
|
||||
data.value = 97;
|
||||
data.name = "NO CAMERA LAST VISIT DATA" + getResources().getString(R.string.download_data);
|
||||
}
|
||||
}
|
||||
publishProgress(data);
|
||||
|
||||
|
||||
/* //MAPPING_COUNTRYWISE_PLANOGRAM
|
||||
@@ -1414,6 +1451,7 @@ public class DownloadActivity extends AppCompatActivity {
|
||||
db.InsertPOGQUESTION(pogQuestionGetterSetter);
|
||||
db.InsertNON_T2P_REASON(nonT2pReasonGetterSetter);
|
||||
db.InsertCONFIGURATION_COUNTRY_WISE(configurationContrywiseGetterSetter);
|
||||
db.InsertNO_CAMERA_LAST_VISIT_DATA(noCameraLastVisitGetterSetter);
|
||||
|
||||
} catch (MalformedURLException e) {
|
||||
|
||||
|
||||
+9
-8
@@ -188,11 +188,11 @@ public class MSL_Availability_StockFacingActivity extends AppCompatActivity {
|
||||
.setCancelable(false)
|
||||
.setPositiveButton(R.string.ok, new DialogInterface.OnClickListener() {
|
||||
public void onClick(DialogInterface dialog, int id) {
|
||||
expandableListView.smoothScrollToPosition(scrollPosition);
|
||||
//expandableListView.smoothScrollToPosition(scrollPosition);
|
||||
|
||||
if (!expandableListView.isGroupExpanded(scrollPosition)) {
|
||||
/* if (!expandableListView.isGroupExpanded(scrollPosition)) {
|
||||
expandableListView.expandGroup(scrollPosition);
|
||||
}
|
||||
}*/
|
||||
dialog.dismiss();
|
||||
}
|
||||
});
|
||||
@@ -1009,7 +1009,7 @@ public class MSL_Availability_StockFacingActivity extends AppCompatActivity {
|
||||
final EditText caption = (EditText) v;
|
||||
String edFaceup = caption.getText().toString().replaceFirst("^0+(?!$)", "");
|
||||
|
||||
if (edFaceup != null && !edFaceup.equals("")) {
|
||||
if (edFaceup != null && !edFaceup.equals("") && !edFaceup.equals(".")) {
|
||||
//int num = Integer.parseInt(edFaceup);
|
||||
double faceup = Double.parseDouble(edFaceup);
|
||||
int num = (int) faceup;
|
||||
@@ -1049,7 +1049,7 @@ public class MSL_Availability_StockFacingActivity extends AppCompatActivity {
|
||||
AlertDialog alert = builder.create();
|
||||
alert.show();
|
||||
} else {*/
|
||||
if (edFaceup != null && !edFaceup.equals("")) {
|
||||
if (edFaceup != null && !edFaceup.equals("") && !edFaceup.equals(".")) {
|
||||
int mbq = Integer.parseInt(childData.getMbq());
|
||||
if(mbq!=0){
|
||||
if (Double.parseDouble(edFaceup) >= 0 && Double.parseDouble(edFaceup) < mbq) {
|
||||
@@ -1152,10 +1152,10 @@ public class MSL_Availability_StockFacingActivity extends AppCompatActivity {
|
||||
|
||||
|
||||
if (isFill) {
|
||||
if (!edFaceup.equals("")) {
|
||||
if (!edFaceup.equals("") && !edFaceup.equals(".")) {
|
||||
String faceup = "";
|
||||
if(edFaceup.equals("0")){
|
||||
faceup = edFaceup;
|
||||
if(edFaceup.equals("0") ||edFaceup.equals(".0")){
|
||||
faceup = "0";
|
||||
}
|
||||
else{
|
||||
faceup = edFaceup.replaceFirst("^0+(?!$)", "");
|
||||
@@ -1168,6 +1168,7 @@ public class MSL_Availability_StockFacingActivity extends AppCompatActivity {
|
||||
childData.setFacing("");
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
+66
-50
@@ -248,7 +248,7 @@ public class PreviousDataUploadActivity extends AppCompatActivity {
|
||||
|
||||
for (int i = 0; i < coverageList.size(); i++) {
|
||||
|
||||
storeData = db.getSpecificStoreData(date, coverageList.get(i).getStoreId(), coverageList.get(i).getFlag_from());
|
||||
storeData = db.getSpecificStoreData(coverageList.get(i).getVisitDate(), coverageList.get(i).getStoreId(), coverageList.get(i).getFlag_from());
|
||||
if (storeData.getSTORE_ID() != null) {
|
||||
|
||||
if (storeData.getCHECKOUT_STATUS().equals(CommonString.KEY_Y) ||
|
||||
@@ -1075,10 +1075,12 @@ public class PreviousDataUploadActivity extends AppCompatActivity {
|
||||
data.name = getString(R.string.pog);
|
||||
publishProgress(data);
|
||||
|
||||
//-----------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
// Images Upload
|
||||
|
||||
// ashish visibility image start
|
||||
if (additionalVisibilityList.size() > 0) {
|
||||
/* if (additionalVisibilityList.size() > 0) {
|
||||
for (int i1 = 0; i1 < additionalVisibilityList.size(); i1++) {
|
||||
|
||||
if (additionalVisibilityList.get(i1).getImage() != null && !additionalVisibilityList.get(i1).getImage().equals("")) {
|
||||
@@ -1086,9 +1088,9 @@ public class PreviousDataUploadActivity extends AppCompatActivity {
|
||||
|
||||
try {
|
||||
result = UploadImage(additionalVisibilityList.get(i1).getImage(), "AdditionalVisibilityImages");
|
||||
/*if (!result.toString().equalsIgnoreCase(CommonString.KEY_SUCCESS)) {
|
||||
*//*if (!result.toString().equalsIgnoreCase(CommonString.KEY_SUCCESS)) {
|
||||
return "AdditionalVisibilityImages";
|
||||
}*/
|
||||
}*//*
|
||||
|
||||
runOnUiThread(new Runnable() {
|
||||
public void run() {
|
||||
@@ -1106,9 +1108,9 @@ public class PreviousDataUploadActivity extends AppCompatActivity {
|
||||
|
||||
try {
|
||||
result = UploadImage(additionalVisibilityList.get(i1).getImage2(), "AdditionalVisibilityImages");
|
||||
/*if (!result.toString().equalsIgnoreCase(CommonString.KEY_SUCCESS)) {
|
||||
*//*if (!result.toString().equalsIgnoreCase(CommonString.KEY_SUCCESS)) {
|
||||
return "AdditionalVisibilityImages";
|
||||
}*/
|
||||
}*//*
|
||||
|
||||
runOnUiThread(new Runnable() {
|
||||
public void run() {
|
||||
@@ -1127,9 +1129,9 @@ public class PreviousDataUploadActivity extends AppCompatActivity {
|
||||
|
||||
try {
|
||||
result = UploadImage(additionalVisibilityList.get(i1).getImage3(), "AdditionalVisibilityImages");
|
||||
/*if (!result.toString().equalsIgnoreCase(CommonString.KEY_SUCCESS)) {
|
||||
*//*if (!result.toString().equalsIgnoreCase(CommonString.KEY_SUCCESS)) {
|
||||
return "AdditionalVisibilityImages";
|
||||
}*/
|
||||
}*//*
|
||||
|
||||
runOnUiThread(new Runnable() {
|
||||
public void run() {
|
||||
@@ -1165,9 +1167,9 @@ public class PreviousDataUploadActivity extends AppCompatActivity {
|
||||
|
||||
try {
|
||||
result = UploadImage(listdat.get(i1).getSubCategoryCamera1(), "CategoryImages");
|
||||
/*if (!result.toString().equalsIgnoreCase(CommonString.KEY_SUCCESS)) {
|
||||
*//*if (!result.toString().equalsIgnoreCase(CommonString.KEY_SUCCESS)) {
|
||||
return "CategoryImages";
|
||||
}*/
|
||||
}*//*
|
||||
|
||||
runOnUiThread(new Runnable() {
|
||||
public void run() {
|
||||
@@ -1185,9 +1187,9 @@ public class PreviousDataUploadActivity extends AppCompatActivity {
|
||||
|
||||
try {
|
||||
result = UploadImage(listdat.get(i1).getSubCategoryCamera2(), "CategoryImages");
|
||||
/*if (!result.toString().equalsIgnoreCase(CommonString.KEY_SUCCESS)) {
|
||||
*//*if (!result.toString().equalsIgnoreCase(CommonString.KEY_SUCCESS)) {
|
||||
return "CategoryImages";
|
||||
}*/
|
||||
}*//*
|
||||
|
||||
runOnUiThread(new Runnable() {
|
||||
public void run() {
|
||||
@@ -1217,9 +1219,9 @@ public class PreviousDataUploadActivity extends AppCompatActivity {
|
||||
|
||||
try {
|
||||
result = UploadImage(adddata.get(i1).getCategoryImage1(), "CategoryImages");
|
||||
/*if (!result.toString().equalsIgnoreCase(CommonString.KEY_SUCCESS)) {
|
||||
*//*if (!result.toString().equalsIgnoreCase(CommonString.KEY_SUCCESS)) {
|
||||
return "CategoryImages";
|
||||
}*/
|
||||
}*//*
|
||||
|
||||
runOnUiThread(new Runnable() {
|
||||
public void run() {
|
||||
@@ -1237,9 +1239,9 @@ public class PreviousDataUploadActivity extends AppCompatActivity {
|
||||
|
||||
try {
|
||||
result = UploadImage(adddata.get(i1).getCategoryImage2(), "CategoryImages");
|
||||
/*if (!result.toString().equalsIgnoreCase(CommonString.KEY_SUCCESS)) {
|
||||
*//*if (!result.toString().equalsIgnoreCase(CommonString.KEY_SUCCESS)) {
|
||||
return "CategoryImages";
|
||||
}*/
|
||||
}*//*
|
||||
|
||||
runOnUiThread(new Runnable() {
|
||||
public void run() {
|
||||
@@ -1257,9 +1259,9 @@ public class PreviousDataUploadActivity extends AppCompatActivity {
|
||||
|
||||
try {
|
||||
result = UploadImage(adddata.get(i1).getCategoryImage3(), "CategoryImages");
|
||||
/*if (!result.toString().equalsIgnoreCase(CommonString.KEY_SUCCESS)) {
|
||||
*//*if (!result.toString().equalsIgnoreCase(CommonString.KEY_SUCCESS)) {
|
||||
return "CategoryImages";
|
||||
}*/
|
||||
}*//*
|
||||
|
||||
runOnUiThread(new Runnable() {
|
||||
public void run() {
|
||||
@@ -1276,9 +1278,9 @@ public class PreviousDataUploadActivity extends AppCompatActivity {
|
||||
|
||||
try {
|
||||
result = UploadImage(adddata.get(i1).getCategoryImage4(), "CategoryImages");
|
||||
/*if (!result.toString().equalsIgnoreCase(CommonString.KEY_SUCCESS)) {
|
||||
*//*if (!result.toString().equalsIgnoreCase(CommonString.KEY_SUCCESS)) {
|
||||
return "CategoryImages";
|
||||
}*/
|
||||
}*//*
|
||||
|
||||
runOnUiThread(new Runnable() {
|
||||
public void run() {
|
||||
@@ -1305,9 +1307,9 @@ public class PreviousDataUploadActivity extends AppCompatActivity {
|
||||
|
||||
try {
|
||||
result = UploadImage(adddata.get(i1).getCategoryImage1(), "CategoryImages");
|
||||
/*if (!result.toString().equalsIgnoreCase(CommonString.KEY_SUCCESS)) {
|
||||
*//*if (!result.toString().equalsIgnoreCase(CommonString.KEY_SUCCESS)) {
|
||||
return "CategoryImages";
|
||||
}*/
|
||||
}*//*
|
||||
|
||||
runOnUiThread(new Runnable() {
|
||||
public void run() {
|
||||
@@ -1325,9 +1327,9 @@ public class PreviousDataUploadActivity extends AppCompatActivity {
|
||||
|
||||
try {
|
||||
result = UploadImage(adddata.get(i1).getCategoryImage2(), "CategoryImages");
|
||||
/*if (!result.toString().equalsIgnoreCase(CommonString.KEY_SUCCESS)) {
|
||||
*//*if (!result.toString().equalsIgnoreCase(CommonString.KEY_SUCCESS)) {
|
||||
return "CategoryImages";
|
||||
}*/
|
||||
}*//*
|
||||
|
||||
runOnUiThread(new Runnable() {
|
||||
public void run() {
|
||||
@@ -1345,9 +1347,9 @@ public class PreviousDataUploadActivity extends AppCompatActivity {
|
||||
|
||||
try {
|
||||
result = UploadImage(adddata.get(i1).getCategoryImage3(), "CategoryImages");
|
||||
/*if (!result.toString().equalsIgnoreCase(CommonString.KEY_SUCCESS)) {
|
||||
*//*if (!result.toString().equalsIgnoreCase(CommonString.KEY_SUCCESS)) {
|
||||
return "CategoryImages";
|
||||
}*/
|
||||
}*//*
|
||||
|
||||
runOnUiThread(new Runnable() {
|
||||
public void run() {
|
||||
@@ -1364,9 +1366,9 @@ public class PreviousDataUploadActivity extends AppCompatActivity {
|
||||
|
||||
try {
|
||||
result = UploadImage(adddata.get(i1).getCategoryImage4(), "CategoryImages");
|
||||
/*if (!result.toString().equalsIgnoreCase(CommonString.KEY_SUCCESS)) {
|
||||
*//*if (!result.toString().equalsIgnoreCase(CommonString.KEY_SUCCESS)) {
|
||||
return "CategoryImages";
|
||||
}*/
|
||||
}*//*
|
||||
|
||||
runOnUiThread(new Runnable() {
|
||||
public void run() {
|
||||
@@ -1393,9 +1395,9 @@ public class PreviousDataUploadActivity extends AppCompatActivity {
|
||||
|
||||
try {
|
||||
result = UploadImage(coverageList.get(i1).getImage(), "StoreImages");
|
||||
/*if (!result.toString().equalsIgnoreCase(CommonString.KEY_SUCCESS)) {
|
||||
*//*if (!result.toString().equalsIgnoreCase(CommonString.KEY_SUCCESS)) {
|
||||
return "StoreImages";
|
||||
}*/
|
||||
}*//*
|
||||
|
||||
runOnUiThread(new Runnable() {
|
||||
public void run() {
|
||||
@@ -1422,9 +1424,9 @@ public class PreviousDataUploadActivity extends AppCompatActivity {
|
||||
|
||||
try {
|
||||
result = UploadImage(promotionSkuList.get(i1).getImage_promotion(), "PromotionImages");
|
||||
/*if (!result.toString().equalsIgnoreCase(CommonString.KEY_SUCCESS)) {
|
||||
*//*if (!result.toString().equalsIgnoreCase(CommonString.KEY_SUCCESS)) {
|
||||
return "StoreImages";
|
||||
}*/
|
||||
}*//*
|
||||
|
||||
runOnUiThread(new Runnable() {
|
||||
public void run() {
|
||||
@@ -1451,9 +1453,9 @@ public class PreviousDataUploadActivity extends AppCompatActivity {
|
||||
|
||||
try {
|
||||
result = UploadImage(additionalPromotionList.get(i1).getImage_promotion(), "AdditionalPromotionImages");
|
||||
/*if (!result.toString().equalsIgnoreCase(CommonString.KEY_SUCCESS)) {
|
||||
*//*if (!result.toString().equalsIgnoreCase(CommonString.KEY_SUCCESS)) {
|
||||
return "StoreImages";
|
||||
}*/
|
||||
}*//*
|
||||
|
||||
runOnUiThread(new Runnable() {
|
||||
public void run() {
|
||||
@@ -1480,9 +1482,9 @@ public class PreviousDataUploadActivity extends AppCompatActivity {
|
||||
|
||||
try {
|
||||
result = UploadImage(coverageList.get(i1).getCheckOut_Image(), "StoreImages");
|
||||
/*if (!result.toString().equalsIgnoreCase(CommonString.KEY_SUCCESS)) {
|
||||
*//*if (!result.toString().equalsIgnoreCase(CommonString.KEY_SUCCESS)) {
|
||||
return "StoreImages";
|
||||
}*/
|
||||
}*//*
|
||||
|
||||
runOnUiThread(new Runnable() {
|
||||
public void run() {
|
||||
@@ -1508,9 +1510,9 @@ public class PreviousDataUploadActivity extends AppCompatActivity {
|
||||
|
||||
try {
|
||||
result = UploadImage(t2PGetterSetters.get(m).getImage(), "T2PImages");
|
||||
/*if (!result.toString().equalsIgnoreCase(CommonString.KEY_SUCCESS)) {
|
||||
*//*if (!result.toString().equalsIgnoreCase(CommonString.KEY_SUCCESS)) {
|
||||
return "T2PImages";
|
||||
}*/
|
||||
}*//*
|
||||
|
||||
runOnUiThread(new Runnable() {
|
||||
public void run() {
|
||||
@@ -1528,9 +1530,9 @@ public class PreviousDataUploadActivity extends AppCompatActivity {
|
||||
|
||||
try {
|
||||
result = UploadImage(t2PGetterSetters.get(m).getImage1(), "T2PImages");
|
||||
/*if (!result.toString().equalsIgnoreCase(CommonString.KEY_SUCCESS)) {
|
||||
*//*if (!result.toString().equalsIgnoreCase(CommonString.KEY_SUCCESS)) {
|
||||
return "T2PImages";
|
||||
}*/
|
||||
}*//*
|
||||
|
||||
runOnUiThread(new Runnable() {
|
||||
public void run() {
|
||||
@@ -1548,9 +1550,9 @@ public class PreviousDataUploadActivity extends AppCompatActivity {
|
||||
|
||||
try {
|
||||
result = UploadImage(t2PGetterSetters.get(m).getImage2(), "T2PImages");
|
||||
/*if (!result.toString().equalsIgnoreCase(CommonString.KEY_SUCCESS)) {
|
||||
*//*if (!result.toString().equalsIgnoreCase(CommonString.KEY_SUCCESS)) {
|
||||
return "T2PImages";
|
||||
}*/
|
||||
}*//*
|
||||
|
||||
runOnUiThread(new Runnable() {
|
||||
public void run() {
|
||||
@@ -1588,7 +1590,7 @@ public class PreviousDataUploadActivity extends AppCompatActivity {
|
||||
|
||||
data.value = 90;
|
||||
publishProgress(data);
|
||||
|
||||
*/
|
||||
|
||||
// SET COVERAGE STATUS
|
||||
String final_xml = "";
|
||||
@@ -1597,7 +1599,7 @@ public class PreviousDataUploadActivity extends AppCompatActivity {
|
||||
+ "[STORE_ID]" + coverageList.get(i).getStoreId() + "[/STORE_ID]"
|
||||
+ "[VISIT_DATE]" + coverageList.get(i).getVisitDate() + "[/VISIT_DATE]"
|
||||
+ "[USER_ID]" + coverageList.get(i).getUserId() + "[/USER_ID]"
|
||||
+ "[STATUS]" + CommonString.KEY_U + "[/STATUS]"
|
||||
+ "[STATUS]" + CommonString.KEY_D + "[/STATUS]"
|
||||
+ "[/COVERAGE_STATUS]";
|
||||
|
||||
final_xml = final_xml + onXML;
|
||||
@@ -1616,6 +1618,9 @@ public class PreviousDataUploadActivity extends AppCompatActivity {
|
||||
|
||||
result = envelope.getResponse();
|
||||
|
||||
//to set previous date for further use in UploadImageWithRetrofit
|
||||
date = coverageList.get(i).getVisitDate();
|
||||
|
||||
//If Result is success then status of that store is update
|
||||
if (result.toString().equalsIgnoreCase(CommonString.KEY_SUCCESS)) {
|
||||
k = k + factor;
|
||||
@@ -1624,18 +1629,19 @@ public class PreviousDataUploadActivity extends AppCompatActivity {
|
||||
publishProgress(data);
|
||||
|
||||
db.open();
|
||||
db.updateCoverageStatus(coverageList.get(i).getStoreId(), CommonString.KEY_U);
|
||||
//db.updateCoverageStatus(coverageList.get(i).getStoreId(), CommonString.KEY_D);
|
||||
db.updateStoreStatusOnLeave(coverageList.get(i).getStoreId(), coverageList.get(i)
|
||||
.getVisitDate(), CommonString.KEY_U, coverageList.get(i).getFlag_from());
|
||||
.getVisitDate(), CommonString.KEY_D, coverageList.get(i).getFlag_from());
|
||||
|
||||
db.deleteTableWithStoreID(coverageList.get(i).getStoreId());
|
||||
//db.deleteTableWithStoreID(coverageList.get(i).getStoreId());
|
||||
}
|
||||
|
||||
data.value = 100;
|
||||
publishProgress(data);
|
||||
}
|
||||
}
|
||||
}
|
||||
return result.toString();
|
||||
return CommonString.KEY_SUCCESS;
|
||||
|
||||
} catch (MalformedURLException e) {
|
||||
e.printStackTrace();
|
||||
@@ -1670,8 +1676,18 @@ public class PreviousDataUploadActivity extends AppCompatActivity {
|
||||
|
||||
if (result.contains(CommonString.KEY_SUCCESS)) {
|
||||
//db.deleteAllTables();
|
||||
showAlert(getString(R.string.data_downloaded_successfully));
|
||||
db.deleteAllTables();
|
||||
|
||||
File f = new File(CommonString.FILE_PATH);
|
||||
//if (f != null && f.listFiles().length > 0) {
|
||||
File file[] = f.listFiles();
|
||||
UploadImageWithRetrofit.uploadedFiles = 0;
|
||||
UploadImageWithRetrofit.totalFiles = file.length;
|
||||
UploadImageWithRetrofit uploadImg = new UploadImageWithRetrofit(date, userId, PreviousDataUploadActivity.this);
|
||||
uploadImg.UploadImageRecursiveNew(PreviousDataUploadActivity.this);
|
||||
/* }
|
||||
else {
|
||||
showAlert(getString(R.string.data_uploaded_successfully));
|
||||
}*/
|
||||
//showAlert(getString(R.string.menu_upload_data));
|
||||
} else {
|
||||
showAlert(getString(R.string.error) + result.toString());
|
||||
|
||||
@@ -44,6 +44,7 @@ import java.net.MalformedURLException;
|
||||
import java.net.SocketException;
|
||||
import java.net.SocketTimeoutException;
|
||||
import java.util.ArrayList;
|
||||
import java.util.concurrent.TimeUnit;
|
||||
|
||||
import javax.xml.parsers.SAXParser;
|
||||
import javax.xml.parsers.SAXParserFactory;
|
||||
@@ -265,7 +266,7 @@ public class UploadActivity extends AppCompatActivity {
|
||||
try {
|
||||
data = new Data();
|
||||
|
||||
ArrayList<CoverageBean> adhoc_coverageList = db.getCoverageData(date, CommonString.FROM_DEVIATION);
|
||||
ArrayList<CoverageBean> adhoc_coverageList = db.getCoverageData(date, CommonString.FROM_DEVIATION);
|
||||
|
||||
if (adhoc_coverageList.size() > 0) {
|
||||
|
||||
@@ -314,17 +315,16 @@ public class UploadActivity extends AppCompatActivity {
|
||||
storeData = db.getSpecificStoreData(date, coverageList.get(i).getStoreId(), coverageList.get(i).getFlag_from());
|
||||
if (storeData.getSTORE_ID() != null) {
|
||||
|
||||
if (storeData.getCHECKOUT_STATUS().equals(CommonString.KEY_Y) ||
|
||||
if (!storeData.getUPLOAD_STATUS().equals(CommonString.KEY_D) && (storeData.getCHECKOUT_STATUS().equals(CommonString.KEY_Y) ||
|
||||
storeData.getCHECKOUT_STATUS().equals(CommonString.KEY_L) ||
|
||||
!storeData.getUPLOAD_STATUS().equals(CommonString.KEY_U)) {
|
||||
!storeData.getUPLOAD_STATUS().equals(CommonString.KEY_U))) {
|
||||
|
||||
String camera_allow = storeData.getCAMERA_ALLOW();
|
||||
String adhoc;
|
||||
if(coverageList.get(i).getFlag_from().equals(CommonString.FROM_DEVIATION)){
|
||||
adhoc ="1";
|
||||
}
|
||||
else {
|
||||
adhoc ="0";
|
||||
if (coverageList.get(i).getFlag_from().equals(CommonString.FROM_DEVIATION)) {
|
||||
adhoc = "1";
|
||||
} else {
|
||||
adhoc = "0";
|
||||
}
|
||||
|
||||
String onXML = "[DATA]"
|
||||
@@ -1027,6 +1027,14 @@ public class UploadActivity extends AppCompatActivity {
|
||||
String onXml_nodata = "", No_camera_data = "";
|
||||
for (int n = 0; n < nocamera_data_list.size(); n++) {
|
||||
|
||||
int vertical;
|
||||
if(nocamera_data_list.get(n).isVertical()){
|
||||
vertical = 1;
|
||||
}
|
||||
else {
|
||||
vertical = 0;
|
||||
}
|
||||
|
||||
onXml_nodata = "[NO_CAMERA_POG_DATA]"
|
||||
+ "[MID]" + mid + "[/MID]"
|
||||
+ "[USER_ID]" + userId + "[/USER_ID]"
|
||||
@@ -1036,6 +1044,7 @@ public class UploadActivity extends AppCompatActivity {
|
||||
+ "[ROW_NO]" + nocamera_data_list.get(n).getRow_no() + "[/ROW_NO]"
|
||||
+ "[COLUMN_NO]" + nocamera_data_list.get(n).getColumn_no() + "[/COLUMN_NO]"
|
||||
+ "[FACING]" + nocamera_data_list.get(n).getFacing() + "[/FACING]"
|
||||
+ "[IS_VERTICAL]" + vertical + "[/IS_VERTICAL]"
|
||||
+ "[/NO_CAMERA_POG_DATA]";
|
||||
|
||||
No_camera_data = No_camera_data + onXml_nodata;
|
||||
@@ -1151,10 +1160,54 @@ public class UploadActivity extends AppCompatActivity {
|
||||
data.name = getString(R.string.pog);
|
||||
publishProgress(data);
|
||||
|
||||
// SET COVERAGE STATUS
|
||||
String final_xml = "";
|
||||
onXML = "";
|
||||
onXML = "[COVERAGE_STATUS]"
|
||||
+ "[STORE_ID]" + coverageList.get(i).getStoreId() + "[/STORE_ID]"
|
||||
+ "[VISIT_DATE]" + coverageList.get(i).getVisitDate() + "[/VISIT_DATE]"
|
||||
+ "[USER_ID]" + coverageList.get(i).getUserId() + "[/USER_ID]"
|
||||
+ "[STATUS]" + CommonString.KEY_D + "[/STATUS]"
|
||||
+ "[/COVERAGE_STATUS]";
|
||||
|
||||
final_xml = final_xml + onXML;
|
||||
|
||||
final String sos_xml = "[DATA]" + final_xml + "[/DATA]";
|
||||
|
||||
request = new SoapObject(CommonString.NAMESPACE, CommonString.METHOD_UPLOAD_COVERAGE_STATUS);
|
||||
request.addProperty("onXML", sos_xml);
|
||||
|
||||
envelope = new SoapSerializationEnvelope(SoapEnvelope.VER11);
|
||||
envelope.dotNet = true;
|
||||
envelope.setOutputSoapObject(request);
|
||||
|
||||
androidHttpTransport = new HttpTransportSE(CommonString.URL);
|
||||
androidHttpTransport.call(CommonString.SOAP_ACTION + CommonString.METHOD_UPLOAD_COVERAGE_STATUS, envelope);
|
||||
|
||||
result = envelope.getResponse();
|
||||
|
||||
//If Result is success then status of that store is update
|
||||
if (result.toString().equalsIgnoreCase(CommonString.KEY_SUCCESS)) {
|
||||
k = k + factor;
|
||||
data.value = k;
|
||||
data.name = "Uploading";
|
||||
publishProgress(data);
|
||||
|
||||
db.open();
|
||||
//db.updateCoverageStatus(coverageList.get(i).getStoreId(), CommonString.KEY_D);
|
||||
db.updateStoreStatusOnLeave(coverageList.get(i).getStoreId(), coverageList.get(i)
|
||||
.getVisitDate(), CommonString.KEY_D, coverageList.get(i).getFlag_from());
|
||||
|
||||
//db.deleteTableWithStoreID(coverageList.get(i).getStoreId());
|
||||
}
|
||||
data.value = 100;
|
||||
publishProgress(data);
|
||||
|
||||
//---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
// Images Upload
|
||||
|
||||
// ashish visibility image start
|
||||
if (additionalVisibilityList.size() > 0) {
|
||||
/* if (additionalVisibilityList.size() > 0) {
|
||||
for (int i1 = 0; i1 < additionalVisibilityList.size(); i1++) {
|
||||
|
||||
if (additionalVisibilityList.get(i1).getImage() != null && !additionalVisibilityList.get(i1).getImage().equals("")) {
|
||||
@@ -1162,9 +1215,9 @@ public class UploadActivity extends AppCompatActivity {
|
||||
|
||||
try {
|
||||
result = UploadImage(additionalVisibilityList.get(i1).getImage(), "AdditionalVisibilityImages");
|
||||
/*if (!result.toString().equalsIgnoreCase(CommonString.KEY_SUCCESS)) {
|
||||
*//*if (!result.toString().equalsIgnoreCase(CommonString.KEY_SUCCESS)) {
|
||||
return "AdditionalVisibilityImages";
|
||||
}*/
|
||||
}*//*
|
||||
|
||||
runOnUiThread(new Runnable() {
|
||||
public void run() {
|
||||
@@ -1182,9 +1235,9 @@ public class UploadActivity extends AppCompatActivity {
|
||||
|
||||
try {
|
||||
result = UploadImage(additionalVisibilityList.get(i1).getImage2(), "AdditionalVisibilityImages");
|
||||
/*if (!result.toString().equalsIgnoreCase(CommonString.KEY_SUCCESS)) {
|
||||
*//*if (!result.toString().equalsIgnoreCase(CommonString.KEY_SUCCESS)) {
|
||||
return "AdditionalVisibilityImages";
|
||||
}*/
|
||||
}*//*
|
||||
|
||||
runOnUiThread(new Runnable() {
|
||||
public void run() {
|
||||
@@ -1203,9 +1256,9 @@ public class UploadActivity extends AppCompatActivity {
|
||||
|
||||
try {
|
||||
result = UploadImage(additionalVisibilityList.get(i1).getImage3(), "AdditionalVisibilityImages");
|
||||
/*if (!result.toString().equalsIgnoreCase(CommonString.KEY_SUCCESS)) {
|
||||
*//*if (!result.toString().equalsIgnoreCase(CommonString.KEY_SUCCESS)) {
|
||||
return "AdditionalVisibilityImages";
|
||||
}*/
|
||||
}*//*
|
||||
|
||||
runOnUiThread(new Runnable() {
|
||||
public void run() {
|
||||
@@ -1241,9 +1294,9 @@ public class UploadActivity extends AppCompatActivity {
|
||||
|
||||
try {
|
||||
result = UploadImage(listdat.get(i1).getSubCategoryCamera1(), "CategoryImages");
|
||||
/*if (!result.toString().equalsIgnoreCase(CommonString.KEY_SUCCESS)) {
|
||||
*//*if (!result.toString().equalsIgnoreCase(CommonString.KEY_SUCCESS)) {
|
||||
return "CategoryImages";
|
||||
}*/
|
||||
}*//*
|
||||
|
||||
runOnUiThread(new Runnable() {
|
||||
public void run() {
|
||||
@@ -1261,9 +1314,9 @@ public class UploadActivity extends AppCompatActivity {
|
||||
|
||||
try {
|
||||
result = UploadImage(listdat.get(i1).getSubCategoryCamera2(), "CategoryImages");
|
||||
/*if (!result.toString().equalsIgnoreCase(CommonString.KEY_SUCCESS)) {
|
||||
*//*if (!result.toString().equalsIgnoreCase(CommonString.KEY_SUCCESS)) {
|
||||
return "CategoryImages";
|
||||
}*/
|
||||
}*//*
|
||||
|
||||
runOnUiThread(new Runnable() {
|
||||
public void run() {
|
||||
@@ -1293,9 +1346,9 @@ public class UploadActivity extends AppCompatActivity {
|
||||
|
||||
try {
|
||||
result = UploadImage(adddata.get(i1).getCategoryImage1(), "CategoryImages");
|
||||
/*if (!result.toString().equalsIgnoreCase(CommonString.KEY_SUCCESS)) {
|
||||
*//*if (!result.toString().equalsIgnoreCase(CommonString.KEY_SUCCESS)) {
|
||||
return "CategoryImages";
|
||||
}*/
|
||||
}*//*
|
||||
|
||||
runOnUiThread(new Runnable() {
|
||||
public void run() {
|
||||
@@ -1313,9 +1366,9 @@ public class UploadActivity extends AppCompatActivity {
|
||||
|
||||
try {
|
||||
result = UploadImage(adddata.get(i1).getCategoryImage2(), "CategoryImages");
|
||||
/*if (!result.toString().equalsIgnoreCase(CommonString.KEY_SUCCESS)) {
|
||||
*//*if (!result.toString().equalsIgnoreCase(CommonString.KEY_SUCCESS)) {
|
||||
return "CategoryImages";
|
||||
}*/
|
||||
}*//*
|
||||
|
||||
runOnUiThread(new Runnable() {
|
||||
public void run() {
|
||||
@@ -1333,9 +1386,9 @@ public class UploadActivity extends AppCompatActivity {
|
||||
|
||||
try {
|
||||
result = UploadImage(adddata.get(i1).getCategoryImage3(), "CategoryImages");
|
||||
/*if (!result.toString().equalsIgnoreCase(CommonString.KEY_SUCCESS)) {
|
||||
*//*if (!result.toString().equalsIgnoreCase(CommonString.KEY_SUCCESS)) {
|
||||
return "CategoryImages";
|
||||
}*/
|
||||
}*//*
|
||||
|
||||
runOnUiThread(new Runnable() {
|
||||
public void run() {
|
||||
@@ -1352,9 +1405,9 @@ public class UploadActivity extends AppCompatActivity {
|
||||
|
||||
try {
|
||||
result = UploadImage(adddata.get(i1).getCategoryImage4(), "CategoryImages");
|
||||
/*if (!result.toString().equalsIgnoreCase(CommonString.KEY_SUCCESS)) {
|
||||
*//*if (!result.toString().equalsIgnoreCase(CommonString.KEY_SUCCESS)) {
|
||||
return "CategoryImages";
|
||||
}*/
|
||||
}*//*
|
||||
|
||||
runOnUiThread(new Runnable() {
|
||||
public void run() {
|
||||
@@ -1381,9 +1434,9 @@ public class UploadActivity extends AppCompatActivity {
|
||||
|
||||
try {
|
||||
result = UploadImage(adddata.get(i1).getCategoryImage1(), "CategoryImages");
|
||||
/*if (!result.toString().equalsIgnoreCase(CommonString.KEY_SUCCESS)) {
|
||||
*//*if (!result.toString().equalsIgnoreCase(CommonString.KEY_SUCCESS)) {
|
||||
return "CategoryImages";
|
||||
}*/
|
||||
}*//*
|
||||
|
||||
runOnUiThread(new Runnable() {
|
||||
public void run() {
|
||||
@@ -1401,9 +1454,9 @@ public class UploadActivity extends AppCompatActivity {
|
||||
|
||||
try {
|
||||
result = UploadImage(adddata.get(i1).getCategoryImage2(), "CategoryImages");
|
||||
/*if (!result.toString().equalsIgnoreCase(CommonString.KEY_SUCCESS)) {
|
||||
*//*if (!result.toString().equalsIgnoreCase(CommonString.KEY_SUCCESS)) {
|
||||
return "CategoryImages";
|
||||
}*/
|
||||
}*//*
|
||||
|
||||
runOnUiThread(new Runnable() {
|
||||
public void run() {
|
||||
@@ -1421,9 +1474,9 @@ public class UploadActivity extends AppCompatActivity {
|
||||
|
||||
try {
|
||||
result = UploadImage(adddata.get(i1).getCategoryImage3(), "CategoryImages");
|
||||
/*if (!result.toString().equalsIgnoreCase(CommonString.KEY_SUCCESS)) {
|
||||
*//*if (!result.toString().equalsIgnoreCase(CommonString.KEY_SUCCESS)) {
|
||||
return "CategoryImages";
|
||||
}*/
|
||||
}*//*
|
||||
|
||||
runOnUiThread(new Runnable() {
|
||||
public void run() {
|
||||
@@ -1440,9 +1493,9 @@ public class UploadActivity extends AppCompatActivity {
|
||||
|
||||
try {
|
||||
result = UploadImage(adddata.get(i1).getCategoryImage4(), "CategoryImages");
|
||||
/*if (!result.toString().equalsIgnoreCase(CommonString.KEY_SUCCESS)) {
|
||||
*//*if (!result.toString().equalsIgnoreCase(CommonString.KEY_SUCCESS)) {
|
||||
return "CategoryImages";
|
||||
}*/
|
||||
}*//*
|
||||
|
||||
runOnUiThread(new Runnable() {
|
||||
public void run() {
|
||||
@@ -1469,9 +1522,9 @@ public class UploadActivity extends AppCompatActivity {
|
||||
|
||||
try {
|
||||
result = UploadImage(coverageList.get(i1).getImage(), "StoreImages");
|
||||
/*if (!result.toString().equalsIgnoreCase(CommonString.KEY_SUCCESS)) {
|
||||
*//*if (!result.toString().equalsIgnoreCase(CommonString.KEY_SUCCESS)) {
|
||||
return "StoreImages";
|
||||
}*/
|
||||
}*//*
|
||||
|
||||
runOnUiThread(new Runnable() {
|
||||
public void run() {
|
||||
@@ -1498,9 +1551,9 @@ public class UploadActivity extends AppCompatActivity {
|
||||
|
||||
try {
|
||||
result = UploadImage(promotionSkuList.get(i1).getImage_promotion(), "PromotionImages");
|
||||
/*if (!result.toString().equalsIgnoreCase(CommonString.KEY_SUCCESS)) {
|
||||
*//*if (!result.toString().equalsIgnoreCase(CommonString.KEY_SUCCESS)) {
|
||||
return "StoreImages";
|
||||
}*/
|
||||
}*//*
|
||||
|
||||
runOnUiThread(new Runnable() {
|
||||
public void run() {
|
||||
@@ -1527,9 +1580,9 @@ public class UploadActivity extends AppCompatActivity {
|
||||
|
||||
try {
|
||||
result = UploadImage(additionalPromotionList.get(i1).getImage_promotion(), "AdditionalPromotionImages");
|
||||
/*if (!result.toString().equalsIgnoreCase(CommonString.KEY_SUCCESS)) {
|
||||
*//*if (!result.toString().equalsIgnoreCase(CommonString.KEY_SUCCESS)) {
|
||||
return "StoreImages";
|
||||
}*/
|
||||
}*//*
|
||||
|
||||
runOnUiThread(new Runnable() {
|
||||
public void run() {
|
||||
@@ -1556,9 +1609,9 @@ public class UploadActivity extends AppCompatActivity {
|
||||
|
||||
try {
|
||||
result = UploadImage(coverageList.get(i1).getCheckOut_Image(), "StoreImages");
|
||||
/*if (!result.toString().equalsIgnoreCase(CommonString.KEY_SUCCESS)) {
|
||||
*//*if (!result.toString().equalsIgnoreCase(CommonString.KEY_SUCCESS)) {
|
||||
return "StoreImages";
|
||||
}*/
|
||||
}*//*
|
||||
|
||||
runOnUiThread(new Runnable() {
|
||||
public void run() {
|
||||
@@ -1584,9 +1637,9 @@ public class UploadActivity extends AppCompatActivity {
|
||||
|
||||
try {
|
||||
result = UploadImage(t2PGetterSetters.get(m).getImage(), "T2PImages");
|
||||
/*if (!result.toString().equalsIgnoreCase(CommonString.KEY_SUCCESS)) {
|
||||
*//*if (!result.toString().equalsIgnoreCase(CommonString.KEY_SUCCESS)) {
|
||||
return "T2PImages";
|
||||
}*/
|
||||
}*//*
|
||||
|
||||
runOnUiThread(new Runnable() {
|
||||
public void run() {
|
||||
@@ -1604,9 +1657,9 @@ public class UploadActivity extends AppCompatActivity {
|
||||
|
||||
try {
|
||||
result = UploadImage(t2PGetterSetters.get(m).getImage1(), "T2PImages");
|
||||
/*if (!result.toString().equalsIgnoreCase(CommonString.KEY_SUCCESS)) {
|
||||
*//*if (!result.toString().equalsIgnoreCase(CommonString.KEY_SUCCESS)) {
|
||||
return "T2PImages";
|
||||
}*/
|
||||
}*//*
|
||||
|
||||
runOnUiThread(new Runnable() {
|
||||
public void run() {
|
||||
@@ -1624,9 +1677,9 @@ public class UploadActivity extends AppCompatActivity {
|
||||
|
||||
try {
|
||||
result = UploadImage(t2PGetterSetters.get(m).getImage2(), "T2PImages");
|
||||
/*if (!result.toString().equalsIgnoreCase(CommonString.KEY_SUCCESS)) {
|
||||
*//*if (!result.toString().equalsIgnoreCase(CommonString.KEY_SUCCESS)) {
|
||||
return "T2PImages";
|
||||
}*/
|
||||
}*//*
|
||||
|
||||
runOnUiThread(new Runnable() {
|
||||
public void run() {
|
||||
@@ -1675,14 +1728,14 @@ public class UploadActivity extends AppCompatActivity {
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}*/
|
||||
|
||||
data.value = 90;
|
||||
publishProgress(data);
|
||||
|
||||
|
||||
// SET COVERAGE STATUS
|
||||
String final_xml = "";
|
||||
/* String final_xml = "";
|
||||
onXML = "";
|
||||
onXML = "[COVERAGE_STATUS]"
|
||||
+ "[STORE_ID]" + coverageList.get(i).getStoreId() + "[/STORE_ID]"
|
||||
@@ -1722,12 +1775,12 @@ public class UploadActivity extends AppCompatActivity {
|
||||
db.deleteTableWithStoreID(coverageList.get(i).getStoreId());
|
||||
}
|
||||
data.value = 100;
|
||||
publishProgress(data);
|
||||
publishProgress(data);*/
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return result.toString();
|
||||
return CommonString.KEY_SUCCESS;
|
||||
|
||||
} catch (MalformedURLException e) {
|
||||
e.printStackTrace();
|
||||
@@ -1755,7 +1808,18 @@ public class UploadActivity extends AppCompatActivity {
|
||||
dialog.dismiss();
|
||||
if (result.contains(CommonString.KEY_SUCCESS)) {
|
||||
//db.deleteAllTables();
|
||||
showAlert(getString(R.string.data_uploaded_successfully));
|
||||
|
||||
File f = new File(CommonString.FILE_PATH);
|
||||
//if (f != null && f.listFiles().length > 0) {
|
||||
File file[] = f.listFiles();
|
||||
UploadImageWithRetrofit.uploadedFiles = 0;
|
||||
UploadImageWithRetrofit.totalFiles = file.length;
|
||||
UploadImageWithRetrofit uploadImg = new UploadImageWithRetrofit(date, userId, UploadActivity.this);
|
||||
uploadImg.UploadImageRecursiveNew(UploadActivity.this);
|
||||
/* }
|
||||
else {
|
||||
showAlert(getString(R.string.data_uploaded_successfully));
|
||||
}*/
|
||||
//showAlert(getString(R.string.menu_upload_data));
|
||||
} else {
|
||||
showAlert(getString(R.string.error) + result.toString());
|
||||
|
||||
@@ -10,27 +10,41 @@ import android.graphics.Bitmap;
|
||||
import android.graphics.BitmapFactory;
|
||||
import android.graphics.Matrix;
|
||||
import android.graphics.RectF;
|
||||
import android.os.AsyncTask;
|
||||
import android.util.Log;
|
||||
|
||||
import com.crashlytics.android.Crashlytics;
|
||||
import com.google.gson.JsonSyntaxException;
|
||||
import com.squareup.okhttp.MultipartBuilder;
|
||||
import com.squareup.okhttp.OkHttpClient;
|
||||
import com.squareup.okhttp.RequestBody;
|
||||
|
||||
import org.json.JSONObject;
|
||||
import org.ksoap2.SoapEnvelope;
|
||||
import org.ksoap2.serialization.SoapObject;
|
||||
import org.ksoap2.serialization.SoapSerializationEnvelope;
|
||||
import org.ksoap2.transport.HttpTransportSE;
|
||||
import org.xmlpull.v1.XmlPullParserException;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.FileInputStream;
|
||||
import java.io.FileOutputStream;
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
import java.net.MalformedURLException;
|
||||
import java.net.SocketException;
|
||||
import java.net.SocketTimeoutException;
|
||||
import java.util.ArrayList;
|
||||
import java.util.concurrent.TimeUnit;
|
||||
|
||||
import cpm.com.gskmtorange.Database.GSKOrangeDB;
|
||||
import cpm.com.gskmtorange.GetterSetter.StoreBean;
|
||||
import cpm.com.gskmtorange.MainActivity;
|
||||
import cpm.com.gskmtorange.R;
|
||||
import cpm.com.gskmtorange.constant.CommonString;
|
||||
import cpm.com.gskmtorange.retrofit.PostApiForFile;
|
||||
import cpm.com.gskmtorange.retrofit.StringConverterFactory;
|
||||
import cpm.com.gskmtorange.xmlGetterSetter.JourneyPlanGetterSetter;
|
||||
import retrofit.Retrofit;
|
||||
|
||||
/**
|
||||
@@ -48,14 +62,16 @@ public class UploadImageWithRetrofit {
|
||||
Context context;
|
||||
String visitDate, userID, uploadStatus;
|
||||
int storeId = 0;
|
||||
//GSKGTMerDB db;
|
||||
GSKOrangeDB db;
|
||||
ProgressDialog pd;
|
||||
//ArrayList<JourneyPlan> storeList;
|
||||
ArrayList<StoreBean> storeList, storeList_deviation;
|
||||
private int factor, k = 0;
|
||||
Data data;
|
||||
|
||||
|
||||
public UploadImageWithRetrofit(Context context) {
|
||||
/*this.visitDate = visitDate;
|
||||
this.userID = userId;*/
|
||||
public UploadImageWithRetrofit(String visitDate, String userId, Context context) {
|
||||
this.visitDate = visitDate;
|
||||
this.userID = userId;
|
||||
this.context = context;
|
||||
pd = new ProgressDialog(context);
|
||||
pd.setCancelable(false);
|
||||
@@ -91,7 +107,7 @@ public class UploadImageWithRetrofit {
|
||||
foldername = "PromotionImages";
|
||||
} else if (file[i].getName().contains("CategoryPicture")) {
|
||||
foldername = "CategoryImages";
|
||||
} else if (file[i].getName().contains("AuditAnsPic ")) {
|
||||
} else if (file[i].getName().contains("AuditAnsPic")) {
|
||||
foldername = "AuditImages";
|
||||
} else {
|
||||
foldername = "Bulkimages";
|
||||
@@ -185,6 +201,127 @@ public class UploadImageWithRetrofit {
|
||||
|
||||
}
|
||||
|
||||
public void UploadImageRecursiveNew(final Context context) {
|
||||
try {
|
||||
|
||||
status = 0;
|
||||
String filename = null, foldername = null;
|
||||
int totalfiles = 0;
|
||||
File f = new File(CommonString.FILE_PATH);
|
||||
File file[] = f.listFiles();
|
||||
count = file.length;
|
||||
if (file.length > 0) {
|
||||
filename = "";
|
||||
totalfiles = f.listFiles().length;
|
||||
pd.setMessage(context.getString(R.string.uploaddata)+" - " +context.getString(R.string.image) + " (" + uploadedFiles + "/" + totalFiles + ")");
|
||||
for (int i = 0; i < file.length; i++) {
|
||||
if (new File(CommonString.FILE_PATH + file[i].getName()).exists()) {
|
||||
if (file[i].getName().contains("SI_") || file[i].getName().contains("CHK_SI_") || file[i].getName().contains("NonWorking")) {
|
||||
foldername = "StoreImages";
|
||||
} else if (file[i].getName().contains("GeoTag")) {
|
||||
foldername = "GeotagImages";
|
||||
} else if (file[i].getName().contains("T2P_Image")) {
|
||||
foldername = "T2PImages";
|
||||
} else if (file[i].getName().contains("AddPromo_Image")) {
|
||||
foldername = "AdditionalPromotionImages";
|
||||
} else if (file[i].getName().contains("Promo_Image")) {
|
||||
foldername = "PromotionImages";
|
||||
} else if (file[i].getName().contains("CategoryPicture")) {
|
||||
foldername = "CategoryImages";
|
||||
} else if (file[i].getName().contains("AuditAnsPic")) {
|
||||
foldername = "AuditImages";
|
||||
} else {
|
||||
foldername = "Bulkimages";
|
||||
}
|
||||
|
||||
filename = file[i].getName();
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
File originalFile = new File(CommonString.FILE_PATH+ filename);
|
||||
final File finalFile = saveBitmapToFileSmaller(originalFile);
|
||||
|
||||
OkHttpClient okHttpClient = new OkHttpClient();
|
||||
okHttpClient.setConnectTimeout(20, TimeUnit.SECONDS);
|
||||
okHttpClient.setWriteTimeout(20, TimeUnit.SECONDS);
|
||||
okHttpClient.setReadTimeout(20, TimeUnit.SECONDS);
|
||||
|
||||
com.squareup.okhttp.RequestBody photo = com.squareup.okhttp.RequestBody.create(com.squareup.okhttp.MediaType.parse("application/octet-stream"), finalFile);
|
||||
body1 = new MultipartBuilder()
|
||||
.type(MultipartBuilder.FORM)
|
||||
.addFormDataPart("file", finalFile.getName(), photo)
|
||||
.addFormDataPart("FolderName", foldername)
|
||||
.build();
|
||||
|
||||
adapter = new retrofit.Retrofit.Builder()
|
||||
.baseUrl(CommonString.URL + "/")
|
||||
.addConverterFactory(new StringConverterFactory())
|
||||
.build();
|
||||
PostApiForFile api = adapter.create(PostApiForFile.class);
|
||||
|
||||
retrofit.Call<String> call = api.getUploadImage(body1);
|
||||
call.enqueue(new retrofit.Callback<String>() {
|
||||
@Override
|
||||
public void onResponse(retrofit.Response<String> response) {
|
||||
if (response.isSuccess() && response.body().contains("Success")) {
|
||||
finalFile.delete();
|
||||
status = 1;
|
||||
uploadedFiles++;
|
||||
} else {
|
||||
status = 0;
|
||||
//uploadedFiles = 0;
|
||||
}
|
||||
if (status == 0) {
|
||||
pd.dismiss();
|
||||
if (!((Activity) context).isFinishing()) {
|
||||
showAlert((Activity) context, context.getString(R.string.DataNot),false);
|
||||
}
|
||||
} else {
|
||||
UploadImageRecursiveNew(context);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onFailure(Throwable t) {
|
||||
if (t instanceof IOException || t instanceof SocketTimeoutException || t instanceof SocketException) {
|
||||
status = -1;
|
||||
//uploadedFiles = 0;
|
||||
pd.dismiss();
|
||||
// AlertandMessages.showAlert((Activity) context, "Network Error in upload", false);
|
||||
if (!((Activity) context).isFinishing()) {
|
||||
showAlert((Activity) context, context.getString(R.string.NetworkError),false);
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
} else {
|
||||
if (totalFiles == uploadedFiles) {
|
||||
//region Coverage upload status Data
|
||||
new StatusUpload().execute();
|
||||
//endregion
|
||||
//pd.cancel();
|
||||
//showAlert((Activity) context, context.getString(R.string.data_uploaded_successfully),true);
|
||||
}
|
||||
|
||||
}
|
||||
} catch (JsonSyntaxException e) {
|
||||
e.printStackTrace();
|
||||
showAlert((Activity) context, "Invalid Json",false);
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
if (totalFiles == uploadedFiles) {
|
||||
showAlert((Activity) context, context.getString(R.string.data_uploaded_successfully),true);
|
||||
} else {
|
||||
showAlert((Activity) context, CommonString.KEY_FAILURE,false);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public File saveBitmapToFileSmaller(File file) {
|
||||
File file2 = file;
|
||||
try {
|
||||
@@ -252,4 +389,142 @@ public class UploadImageWithRetrofit {
|
||||
alert.show();
|
||||
}
|
||||
|
||||
public class StatusUpload extends AsyncTask<String, String, String> {
|
||||
|
||||
@Override
|
||||
protected String doInBackground(String... strings) {
|
||||
|
||||
try {
|
||||
db = new GSKOrangeDB(context);
|
||||
db.open();
|
||||
data = new Data();
|
||||
storeList = db.getStoreData(visitDate, CommonString.KEY_JOURNEY_PLAN);
|
||||
for (int i = 0; i < storeList.size(); i++) {
|
||||
if (storeList.get(i).getUPLOAD_STATUS().equalsIgnoreCase(CommonString.KEY_D)) {
|
||||
// SET COVERAGE STATUS
|
||||
String final_xml = "";
|
||||
String onXML = "";
|
||||
onXML = "[COVERAGE_STATUS]"
|
||||
+ "[STORE_ID]" + storeList.get(i).getSTORE_ID() + "[/STORE_ID]"
|
||||
+ "[VISIT_DATE]" + storeList.get(i).getVISIT_DATE()+ "[/VISIT_DATE]"
|
||||
+ "[USER_ID]" + userID + "[/USER_ID]"
|
||||
+ "[STATUS]" + CommonString.KEY_U + "[/STATUS]"
|
||||
+ "[/COVERAGE_STATUS]";
|
||||
|
||||
final_xml = final_xml + onXML;
|
||||
|
||||
final String sos_xml = "[DATA]" + final_xml + "[/DATA]";
|
||||
|
||||
SoapObject request = new SoapObject(CommonString.NAMESPACE, CommonString.METHOD_UPLOAD_COVERAGE_STATUS);
|
||||
request.addProperty("onXML", sos_xml);
|
||||
|
||||
SoapSerializationEnvelope envelope = new SoapSerializationEnvelope(SoapEnvelope.VER11);
|
||||
envelope.dotNet = true;
|
||||
envelope.setOutputSoapObject(request);
|
||||
|
||||
HttpTransportSE androidHttpTransport = new HttpTransportSE(CommonString.URL);
|
||||
androidHttpTransport.call(CommonString.SOAP_ACTION + CommonString.METHOD_UPLOAD_COVERAGE_STATUS, envelope);
|
||||
|
||||
Object result = envelope.getResponse();
|
||||
|
||||
//If Result is success then status of that store is update
|
||||
if (result.toString().equalsIgnoreCase(CommonString.KEY_SUCCESS)) {
|
||||
|
||||
db.open();
|
||||
db.updateCoverageStatus(storeList.get(i).getSTORE_ID(), CommonString.KEY_U);
|
||||
db.updateStoreStatusOnLeave(storeList.get(i).getSTORE_ID(), storeList.get(i).getVISIT_DATE(),
|
||||
CommonString.KEY_U, CommonString.FROM_JCP);
|
||||
|
||||
db.deleteTableWithStoreID(storeList.get(i).getSTORE_ID());
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
db.open();
|
||||
storeList_deviation = db.getStoreData(visitDate, CommonString.KEY_ADHOC_JOURNEY_PLAN);
|
||||
for (int i = 0; i < storeList_deviation.size(); i++) {
|
||||
if (storeList_deviation.get(i).getUPLOAD_STATUS().equalsIgnoreCase(CommonString.KEY_D)) {
|
||||
// SET COVERAGE STATUS
|
||||
String final_xml = "";
|
||||
String onXML = "";
|
||||
onXML = "[COVERAGE_STATUS]"
|
||||
+ "[STORE_ID]" + storeList_deviation.get(i).getSTORE_ID() + "[/STORE_ID]"
|
||||
+ "[VISIT_DATE]" + storeList_deviation.get(i).getVISIT_DATE()+ "[/VISIT_DATE]"
|
||||
+ "[USER_ID]" + userID + "[/USER_ID]"
|
||||
+ "[STATUS]" + CommonString.KEY_U + "[/STATUS]"
|
||||
+ "[/COVERAGE_STATUS]";
|
||||
|
||||
final_xml = final_xml + onXML;
|
||||
|
||||
final String sos_xml = "[DATA]" + final_xml + "[/DATA]";
|
||||
|
||||
SoapObject request = new SoapObject(CommonString.NAMESPACE, CommonString.METHOD_UPLOAD_COVERAGE_STATUS);
|
||||
request.addProperty("onXML", sos_xml);
|
||||
|
||||
SoapSerializationEnvelope envelope = new SoapSerializationEnvelope(SoapEnvelope.VER11);
|
||||
envelope.dotNet = true;
|
||||
envelope.setOutputSoapObject(request);
|
||||
|
||||
HttpTransportSE androidHttpTransport = new HttpTransportSE(CommonString.URL);
|
||||
androidHttpTransport.call(CommonString.SOAP_ACTION + CommonString.METHOD_UPLOAD_COVERAGE_STATUS, envelope);
|
||||
|
||||
Object result = envelope.getResponse();
|
||||
|
||||
//If Result is success then status of that store is update
|
||||
if (result.toString().equalsIgnoreCase(CommonString.KEY_SUCCESS)) {
|
||||
|
||||
db.open();
|
||||
db.updateCoverageStatus(storeList_deviation.get(i).getSTORE_ID(), CommonString.KEY_U);
|
||||
db.updateStoreStatusOnLeave(storeList_deviation.get(i).getSTORE_ID(), storeList_deviation.get(i).getVISIT_DATE(),
|
||||
CommonString.KEY_U, CommonString.KEY_ADHOC_JOURNEY_PLAN);
|
||||
|
||||
db.deleteTableWithStoreID(storeList_deviation.get(i).getSTORE_ID());
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
} catch (MalformedURLException e) {
|
||||
e.printStackTrace();
|
||||
} catch (IOException e) {
|
||||
Crashlytics.log(7, CommonString.MESSAGE_EXCEPTION, e.toString());
|
||||
Crashlytics.logException(e.getCause());
|
||||
Crashlytics.logException(new Exception(e.getCause()));
|
||||
e.printStackTrace();
|
||||
} catch (XmlPullParserException e) {
|
||||
e.printStackTrace();
|
||||
} catch (Exception e) {
|
||||
Crashlytics.log(7, CommonString.MESSAGE_EXCEPTION, e.toString());
|
||||
Crashlytics.logException(e.getCause());
|
||||
Crashlytics.logException(new Exception(e.getCause()));
|
||||
e.printStackTrace();
|
||||
}
|
||||
if (statusUpdated) {
|
||||
return CommonString.KEY_SUCCESS;
|
||||
} else {
|
||||
return CommonString.KEY_FAILURE;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onPostExecute(String s) {
|
||||
super.onPostExecute(s);
|
||||
pd.dismiss();
|
||||
if (s.equalsIgnoreCase(CommonString.KEY_SUCCESS)) {
|
||||
if (totalFiles == uploadedFiles) {
|
||||
//AlertandMessages.showAlert((Activity) context, "All images uploaded Successfully", true);
|
||||
showAlert((Activity) context, context.getString(R.string.data_uploaded_successfully),true);
|
||||
} else {
|
||||
showAlert((Activity) context, context.getString(R.string.DataNot),true);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
class Data {
|
||||
int value;
|
||||
String name;
|
||||
}
|
||||
}
|
||||
|
||||
+4
-3
@@ -11,6 +11,10 @@ public class NoCameraDataGetterSetter {
|
||||
|
||||
boolean isVertical=false;
|
||||
|
||||
String SUB_CATEGORY_ID;
|
||||
String SUB_CATEGORY;
|
||||
int facing, row_no, column_no;
|
||||
|
||||
public String getSKUGROUP_ID() {
|
||||
return SKUGROUP_ID;
|
||||
}
|
||||
@@ -28,9 +32,6 @@ public class NoCameraDataGetterSetter {
|
||||
}
|
||||
|
||||
String CATEGORY_ID;
|
||||
String SUB_CATEGORY_ID;
|
||||
String SUB_CATEGORY;
|
||||
int facing, row_no, column_no;
|
||||
|
||||
public int getFacing() {
|
||||
return facing;
|
||||
|
||||
+108
@@ -0,0 +1,108 @@
|
||||
package cpm.com.gskmtorange.xmlGetterSetter;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
||||
public class NoCameraLastVisitGetterSetter {
|
||||
|
||||
String table_NO_CAMERA_LAST_VISIT_DATA;
|
||||
|
||||
ArrayList<String> MID = new ArrayList<>();
|
||||
ArrayList<String> STORE_ID = new ArrayList<>();
|
||||
ArrayList<String> VISIT_DATE = new ArrayList<>();
|
||||
ArrayList<String> SKUGROUP_ID = new ArrayList<>();
|
||||
ArrayList<String> ROW_NO = new ArrayList<>();
|
||||
ArrayList<String> COLUMN_NO = new ArrayList<>();
|
||||
ArrayList<String> FACING = new ArrayList<>();
|
||||
ArrayList<String> IS_VERTICAL = new ArrayList<>();
|
||||
|
||||
public ArrayList<String> getCATEGORY_ID() {
|
||||
return CATEGORY_ID;
|
||||
}
|
||||
|
||||
public void setCATEGORY_ID(String CATEGORY_ID) {
|
||||
this.CATEGORY_ID.add(CATEGORY_ID);
|
||||
}
|
||||
|
||||
public ArrayList<String> getSUB_CATEGORY_ID() {
|
||||
return SUB_CATEGORY_ID;
|
||||
}
|
||||
|
||||
public void setSUB_CATEGORY_ID(String SUB_CATEGORY_ID) {
|
||||
this.SUB_CATEGORY_ID.add(SUB_CATEGORY_ID);
|
||||
}
|
||||
|
||||
ArrayList<String> CATEGORY_ID = new ArrayList<>();
|
||||
ArrayList<String> SUB_CATEGORY_ID = new ArrayList<>();
|
||||
|
||||
public String getTable_NO_CAMERA_LAST_VISIT_DATA() {
|
||||
return table_NO_CAMERA_LAST_VISIT_DATA;
|
||||
}
|
||||
|
||||
public void setTable_NO_CAMERA_LAST_VISIT_DATA(String table_NO_CAMERA_LAST_VISIT_DATA) {
|
||||
this.table_NO_CAMERA_LAST_VISIT_DATA = table_NO_CAMERA_LAST_VISIT_DATA;
|
||||
}
|
||||
|
||||
public ArrayList<String> getMID() {
|
||||
return MID;
|
||||
}
|
||||
|
||||
public void setMID(String MID) {
|
||||
this.MID.add(MID);
|
||||
}
|
||||
|
||||
public ArrayList<String> getSTORE_ID() {
|
||||
return STORE_ID;
|
||||
}
|
||||
|
||||
public void setSTORE_ID(String STORE_ID) {
|
||||
this.STORE_ID.add(STORE_ID);
|
||||
}
|
||||
|
||||
public ArrayList<String> getVISIT_DATE() {
|
||||
return VISIT_DATE;
|
||||
}
|
||||
|
||||
public void setVISIT_DATE(String VISIT_DATE) {
|
||||
this.VISIT_DATE.add(VISIT_DATE);
|
||||
}
|
||||
|
||||
public ArrayList<String> getSKUGROUP_ID() {
|
||||
return SKUGROUP_ID;
|
||||
}
|
||||
|
||||
public void setSKUGROUP_ID(String SKUGROUP_ID) {
|
||||
this.SKUGROUP_ID.add(SKUGROUP_ID);
|
||||
}
|
||||
|
||||
public ArrayList<String> getROW_NO() {
|
||||
return ROW_NO;
|
||||
}
|
||||
|
||||
public void setROW_NO(String ROW_NO) {
|
||||
this.ROW_NO.add(ROW_NO);
|
||||
}
|
||||
|
||||
public ArrayList<String> getCOLUMN_NO() {
|
||||
return COLUMN_NO;
|
||||
}
|
||||
|
||||
public void setCOLUMN_NO(String COLUMN_NO) {
|
||||
this.COLUMN_NO.add(COLUMN_NO);
|
||||
}
|
||||
|
||||
public ArrayList<String> getFACING() {
|
||||
return FACING;
|
||||
}
|
||||
|
||||
public void setFACING(String FACING) {
|
||||
this.FACING.add(FACING);
|
||||
}
|
||||
|
||||
public ArrayList<String> getIS_VERTICAL() {
|
||||
return IS_VERTICAL;
|
||||
}
|
||||
|
||||
public void setIS_VERTICAL(String IS_VERTICAL) {
|
||||
this.IS_VERTICAL.add(IS_VERTICAL);
|
||||
}
|
||||
}
|
||||
@@ -36,6 +36,7 @@ public class TableBean {
|
||||
public static String Table_POG_QUESTION;
|
||||
public static String Table_NON_T2P_REASON;
|
||||
public static String Table_CONFIGURATION_COUNTRY_WISE;
|
||||
public static String Table_NO_CAMERA_LAST_VISIT_DATA;
|
||||
|
||||
|
||||
public static String getAdditionalDisplay() {
|
||||
@@ -262,4 +263,12 @@ public class TableBean {
|
||||
public static void setTable_CONFIGURATION_COUNTRY_WISE(String table_CONFIGURATION_COUNTRY_WISE) {
|
||||
Table_CONFIGURATION_COUNTRY_WISE = table_CONFIGURATION_COUNTRY_WISE;
|
||||
}
|
||||
|
||||
public static String getTable_NO_CAMERA_LAST_VISIT_DATA() {
|
||||
return Table_NO_CAMERA_LAST_VISIT_DATA;
|
||||
}
|
||||
|
||||
public static void setTable_NO_CAMERA_LAST_VISIT_DATA(String table_NO_CAMERA_LAST_VISIT_DATA) {
|
||||
Table_NO_CAMERA_LAST_VISIT_DATA = table_NO_CAMERA_LAST_VISIT_DATA;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -26,6 +26,8 @@ import cpm.com.gskmtorange.xmlGetterSetter.MappingPlanogramCountrywiseGetterSett
|
||||
import cpm.com.gskmtorange.xmlGetterSetter.MappingPromotionGetterSetter;
|
||||
import cpm.com.gskmtorange.xmlGetterSetter.MappingStockGetterSetter;
|
||||
import cpm.com.gskmtorange.xmlGetterSetter.MappingSubCategoryImageAllowGetterSetter;
|
||||
import cpm.com.gskmtorange.xmlGetterSetter.NoCameraDataGetterSetter;
|
||||
import cpm.com.gskmtorange.xmlGetterSetter.NoCameraLastVisitGetterSetter;
|
||||
import cpm.com.gskmtorange.xmlGetterSetter.NonT2pReasonGetterSetter;
|
||||
import cpm.com.gskmtorange.xmlGetterSetter.NonWorkingReasonGetterSetter;
|
||||
import cpm.com.gskmtorange.xmlGetterSetter.POGQuestionGetterSetter;
|
||||
@@ -1208,4 +1210,57 @@ public class XMLHandlers {
|
||||
}
|
||||
return st;
|
||||
}
|
||||
|
||||
//NO_CAMERA_LAST_VISIT_DATA
|
||||
public static NoCameraLastVisitGetterSetter noCameraLastVisitXMLHandler(XmlPullParser xpp, int eventType) {
|
||||
NoCameraLastVisitGetterSetter st = new NoCameraLastVisitGetterSetter();
|
||||
|
||||
try {
|
||||
while (xpp.getEventType() != XmlPullParser.END_DOCUMENT) {
|
||||
if (xpp.getEventType() == XmlPullParser.START_TAG) {
|
||||
|
||||
if (xpp.getName().equals("META_DATA")) {
|
||||
st.setTable_NO_CAMERA_LAST_VISIT_DATA(xpp.nextText());
|
||||
}
|
||||
if (xpp.getName().equals("MID")) {
|
||||
st.setMID(xpp.nextText());
|
||||
}
|
||||
if (xpp.getName().equals("STORE_ID")) {
|
||||
st.setSTORE_ID(xpp.nextText());
|
||||
}
|
||||
if (xpp.getName().equals("VISIT_DATE")) {
|
||||
st.setVISIT_DATE(xpp.nextText());
|
||||
}
|
||||
if (xpp.getName().equals("CATEGORY_ID")) {
|
||||
st.setCATEGORY_ID(xpp.nextText());
|
||||
}
|
||||
if (xpp.getName().equals("SUB_CATEGORY_ID")) {
|
||||
st.setSUB_CATEGORY_ID(xpp.nextText());
|
||||
}
|
||||
if (xpp.getName().equals("SKUGROUP_ID")) {
|
||||
st.setSKUGROUP_ID(xpp.nextText());
|
||||
}
|
||||
if (xpp.getName().equals("ROW_NO")) {
|
||||
st.setROW_NO(xpp.nextText());
|
||||
}
|
||||
if (xpp.getName().equals("COLUMN_NO")) {
|
||||
st.setCOLUMN_NO(xpp.nextText());
|
||||
}
|
||||
if (xpp.getName().equals("FACING")) {
|
||||
st.setFACING(xpp.nextText());
|
||||
}
|
||||
if (xpp.getName().equals("IS_VERTICAL")) {
|
||||
st.setIS_VERTICAL(xpp.nextText());
|
||||
}
|
||||
|
||||
}
|
||||
xpp.next();
|
||||
}
|
||||
} catch (XmlPullParserException e) {
|
||||
e.printStackTrace();
|
||||
} catch (IOException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
return st;
|
||||
}
|
||||
}
|
||||
|
||||
+1
-1
@@ -9,7 +9,7 @@ buildscript {
|
||||
}
|
||||
}
|
||||
dependencies {
|
||||
classpath 'com.android.tools.build:gradle:3.1.2'
|
||||
classpath 'com.android.tools.build:gradle:3.1.4'
|
||||
classpath 'io.fabric.tools:gradle:1.24.4'
|
||||
// NOTE: Do not place your application dependencies here; they belong
|
||||
// in the individual module build.gradle files
|
||||
|
||||
Reference in New Issue
Block a user