Merge pull request #62 from CPM-INDIA-SALES-AND-MARKETING-PVT-LTD/YSY_SA_N_Pharma
Ysy sa n pharma
@@ -1,29 +0,0 @@
|
|||||||
<component name="ProjectCodeStyleConfiguration">
|
|
||||||
<code_scheme name="Project" version="173">
|
|
||||||
<Objective-C-extensions>
|
|
||||||
<file>
|
|
||||||
<option name="com.jetbrains.cidr.lang.util.OCDeclarationKind" value="Import" />
|
|
||||||
<option name="com.jetbrains.cidr.lang.util.OCDeclarationKind" value="Macro" />
|
|
||||||
<option name="com.jetbrains.cidr.lang.util.OCDeclarationKind" value="Typedef" />
|
|
||||||
<option name="com.jetbrains.cidr.lang.util.OCDeclarationKind" value="Enum" />
|
|
||||||
<option name="com.jetbrains.cidr.lang.util.OCDeclarationKind" value="Constant" />
|
|
||||||
<option name="com.jetbrains.cidr.lang.util.OCDeclarationKind" value="Global" />
|
|
||||||
<option name="com.jetbrains.cidr.lang.util.OCDeclarationKind" value="Struct" />
|
|
||||||
<option name="com.jetbrains.cidr.lang.util.OCDeclarationKind" value="FunctionPredecl" />
|
|
||||||
<option name="com.jetbrains.cidr.lang.util.OCDeclarationKind" value="Function" />
|
|
||||||
</file>
|
|
||||||
<class>
|
|
||||||
<option name="com.jetbrains.cidr.lang.util.OCDeclarationKind" value="Property" />
|
|
||||||
<option name="com.jetbrains.cidr.lang.util.OCDeclarationKind" value="Synthesize" />
|
|
||||||
<option name="com.jetbrains.cidr.lang.util.OCDeclarationKind" value="InitMethod" />
|
|
||||||
<option name="com.jetbrains.cidr.lang.util.OCDeclarationKind" value="StaticMethod" />
|
|
||||||
<option name="com.jetbrains.cidr.lang.util.OCDeclarationKind" value="InstanceMethod" />
|
|
||||||
<option name="com.jetbrains.cidr.lang.util.OCDeclarationKind" value="DeallocMethod" />
|
|
||||||
</class>
|
|
||||||
<extensions>
|
|
||||||
<pair source="cpp" header="h" fileNamingConvention="NONE" />
|
|
||||||
<pair source="c" header="h" fileNamingConvention="NONE" />
|
|
||||||
</extensions>
|
|
||||||
</Objective-C-extensions>
|
|
||||||
</code_scheme>
|
|
||||||
</component>
|
|
||||||
@@ -0,0 +1,4 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<project version="4">
|
||||||
|
<component name="Encoding" addBOMForNewFiles="with NO BOM" />
|
||||||
|
</project>
|
||||||
@@ -42,7 +42,7 @@
|
|||||||
</value>
|
</value>
|
||||||
</option>
|
</option>
|
||||||
</component>
|
</component>
|
||||||
<component name="ProjectRootManager" version="2" languageLevel="JDK_1_7" project-jdk-name="1.8" project-jdk-type="JavaSDK">
|
<component name="ProjectRootManager" version="2" languageLevel="JDK_1_8" project-jdk-name="1.8" project-jdk-type="JavaSDK">
|
||||||
<output url="file://$PROJECT_DIR$/build/classes" />
|
<output url="file://$PROJECT_DIR$/build/classes" />
|
||||||
</component>
|
</component>
|
||||||
<component name="ProjectType">
|
<component name="ProjectType">
|
||||||
|
|||||||
@@ -25,20 +25,20 @@ android {
|
|||||||
versionName "3.5"*/
|
versionName "3.5"*/
|
||||||
|
|
||||||
//For UAE
|
//For UAE
|
||||||
versionCode 20
|
/*versionCode 21
|
||||||
versionName "3.2"
|
versionName "3.3"*/
|
||||||
|
|
||||||
//For Turkey
|
//For Turkey
|
||||||
/*versionCode 21
|
/*versionCode 21
|
||||||
versionName "3.3"*/
|
versionName "3.3"*/
|
||||||
|
|
||||||
//For KSA
|
//For KSA
|
||||||
/*versionCode 23
|
/*versionCode 25
|
||||||
versionName "3.5"*/
|
versionName "3.7"*/
|
||||||
|
|
||||||
//For SA
|
//For SA
|
||||||
/*versionCode 22
|
versionCode 26
|
||||||
versionName "3.4"*/
|
versionName "3.7"
|
||||||
|
|
||||||
multiDexEnabled true
|
multiDexEnabled true
|
||||||
|
|
||||||
@@ -58,6 +58,7 @@ dependencies {
|
|||||||
implementation 'com.google.firebase:firebase-messaging:17.3.3'
|
implementation 'com.google.firebase:firebase-messaging:17.3.3'
|
||||||
implementation fileTree(dir: 'libs', include: ['*.jar'])
|
implementation fileTree(dir: 'libs', include: ['*.jar'])
|
||||||
implementation files('libs/ksoap2-android-assembly-3.6.2-jar-with-dependencies.jar')
|
implementation files('libs/ksoap2-android-assembly-3.6.2-jar-with-dependencies.jar')
|
||||||
|
implementation 'com.android.support:support-v4:28.0.0'
|
||||||
androidTestImplementation('com.android.support.test.espresso:espresso-core:2.2.2', {
|
androidTestImplementation('com.android.support.test.espresso:espresso-core:2.2.2', {
|
||||||
exclude group: 'com.android.support', module: 'support-annotations'
|
exclude group: 'com.android.support', module: 'support-annotations'
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -25,12 +25,25 @@
|
|||||||
android:supportsRtl="true"
|
android:supportsRtl="true"
|
||||||
android:theme="@style/AppTheme">
|
android:theme="@style/AppTheme">
|
||||||
<activity
|
<activity
|
||||||
android:name=".dailyentry.CounterfeitProductsActivity"
|
android:name=".pharma_stores.PharmaActivity"
|
||||||
android:label="@string/title_activity_counterfeit_products"
|
android:label="@string/title_activity_paharma"
|
||||||
android:theme="@style/AppTheme.NoActionBar"
|
|
||||||
android:configChanges="screenSize|orientation|keyboardHidden"
|
|
||||||
android:screenOrientation="portrait"
|
android:screenOrientation="portrait"
|
||||||
android:windowSoftInputMode="adjustPan"></activity>
|
android:configChanges="screenSize|orientation|keyboardHidden"
|
||||||
|
android:theme="@style/AppTheme.NoActionBar"></activity>
|
||||||
|
<activity
|
||||||
|
android:name=".dailyentry.StockActivity"
|
||||||
|
android:configChanges="screenSize|orientation|keyboardHidden"
|
||||||
|
android:label="@string/stock"
|
||||||
|
android:screenOrientation="portrait"
|
||||||
|
android:theme="@style/AppTheme.NoActionBar"
|
||||||
|
android:windowSoftInputMode="adjustPan" />
|
||||||
|
<activity
|
||||||
|
android:name=".dailyentry.CounterfeitProductsActivity"
|
||||||
|
android:configChanges="screenSize|orientation|keyboardHidden"
|
||||||
|
android:label="@string/title_activity_counterfeit_products"
|
||||||
|
android:screenOrientation="portrait"
|
||||||
|
android:theme="@style/AppTheme.NoActionBar"
|
||||||
|
android:windowSoftInputMode="adjustPan" />
|
||||||
<activity
|
<activity
|
||||||
android:name=".password.MPinActivity"
|
android:name=".password.MPinActivity"
|
||||||
android:label="@string/title_activity_mpin"
|
android:label="@string/title_activity_mpin"
|
||||||
@@ -45,6 +58,7 @@
|
|||||||
<activity
|
<activity
|
||||||
android:name=".SplashScreenActivity"
|
android:name=".SplashScreenActivity"
|
||||||
android:label="@string/app_name"
|
android:label="@string/app_name"
|
||||||
|
android:screenOrientation="portrait"
|
||||||
android:theme="@style/AppTheme.NoActionBar">
|
android:theme="@style/AppTheme.NoActionBar">
|
||||||
<intent-filter>
|
<intent-filter>
|
||||||
<action android:name="android.intent.action.MAIN" />
|
<action android:name="android.intent.action.MAIN" />
|
||||||
@@ -244,6 +258,7 @@
|
|||||||
android:name=".dailyentry.StockDataActivity"
|
android:name=".dailyentry.StockDataActivity"
|
||||||
android:configChanges="screenSize|orientation|keyboardHidden"
|
android:configChanges="screenSize|orientation|keyboardHidden"
|
||||||
android:label="@string/title_activity_stock_data"
|
android:label="@string/title_activity_stock_data"
|
||||||
|
android:screenOrientation="portrait"
|
||||||
android:theme="@style/AppTheme.NoActionBar"
|
android:theme="@style/AppTheme.NoActionBar"
|
||||||
android:windowSoftInputMode="adjustPan" />
|
android:windowSoftInputMode="adjustPan" />
|
||||||
<activity
|
<activity
|
||||||
@@ -263,8 +278,11 @@
|
|||||||
|
|
||||||
<activity
|
<activity
|
||||||
android:name=".dailyentry.POGQuestionsActivity"
|
android:name=".dailyentry.POGQuestionsActivity"
|
||||||
|
android:configChanges="screenSize|orientation|keyboardHidden"
|
||||||
android:label="@string/title_activity_pogquestions"
|
android:label="@string/title_activity_pogquestions"
|
||||||
android:theme="@style/AppTheme.NoActionBar" />
|
android:screenOrientation="portrait"
|
||||||
|
android:theme="@style/AppTheme.NoActionBar"
|
||||||
|
android:windowSoftInputMode="adjustPan" />
|
||||||
<!--
|
<!--
|
||||||
The API key for Google Maps-based APIs is defined as a string resource.
|
The API key for Google Maps-based APIs is defined as a string resource.
|
||||||
(See the file "res/values/google_maps_api.xml").
|
(See the file "res/values/google_maps_api.xml").
|
||||||
|
|||||||
@@ -42,6 +42,7 @@ import cpm.com.gskmtorange.xmlGetterSetter.DisplayChecklistMasterGetterSetter;
|
|||||||
import cpm.com.gskmtorange.xmlGetterSetter.DisplayMasterGetterSetter;
|
import cpm.com.gskmtorange.xmlGetterSetter.DisplayMasterGetterSetter;
|
||||||
import cpm.com.gskmtorange.xmlGetterSetter.GapsChecklistGetterSetter;
|
import cpm.com.gskmtorange.xmlGetterSetter.GapsChecklistGetterSetter;
|
||||||
import cpm.com.gskmtorange.xmlGetterSetter.GeoFencingGetterSetter;
|
import cpm.com.gskmtorange.xmlGetterSetter.GeoFencingGetterSetter;
|
||||||
|
import cpm.com.gskmtorange.xmlGetterSetter.ImageGetterSetter;
|
||||||
import cpm.com.gskmtorange.xmlGetterSetter.JourneyPlanGetterSetter;
|
import cpm.com.gskmtorange.xmlGetterSetter.JourneyPlanGetterSetter;
|
||||||
import cpm.com.gskmtorange.xmlGetterSetter.MAPPINGT2PGetterSetter;
|
import cpm.com.gskmtorange.xmlGetterSetter.MAPPINGT2PGetterSetter;
|
||||||
import cpm.com.gskmtorange.xmlGetterSetter.MAPPING_ADDITIONAL_PROMOTION_MasterGetterSetter;
|
import cpm.com.gskmtorange.xmlGetterSetter.MAPPING_ADDITIONAL_PROMOTION_MasterGetterSetter;
|
||||||
@@ -52,6 +53,8 @@ import cpm.com.gskmtorange.xmlGetterSetter.MSL_AvailabilityGetterSetter;
|
|||||||
import cpm.com.gskmtorange.xmlGetterSetter.MSL_AvailabilityStockFacingGetterSetter;
|
import cpm.com.gskmtorange.xmlGetterSetter.MSL_AvailabilityStockFacingGetterSetter;
|
||||||
import cpm.com.gskmtorange.xmlGetterSetter.MappingCategoryImageAllowGetterSetter;
|
import cpm.com.gskmtorange.xmlGetterSetter.MappingCategoryImageAllowGetterSetter;
|
||||||
import cpm.com.gskmtorange.xmlGetterSetter.MappingDisplayChecklistGetterSetter;
|
import cpm.com.gskmtorange.xmlGetterSetter.MappingDisplayChecklistGetterSetter;
|
||||||
|
import cpm.com.gskmtorange.xmlGetterSetter.MappingPharmaMSLGetterSetter;
|
||||||
|
import cpm.com.gskmtorange.xmlGetterSetter.MappingPharmaQuestionGetterSetter;
|
||||||
import cpm.com.gskmtorange.xmlGetterSetter.MappingPlanogramCountrywiseGetterSetter;
|
import cpm.com.gskmtorange.xmlGetterSetter.MappingPlanogramCountrywiseGetterSetter;
|
||||||
import cpm.com.gskmtorange.xmlGetterSetter.MappingPlanogramStorewiseGetterSetter;
|
import cpm.com.gskmtorange.xmlGetterSetter.MappingPlanogramStorewiseGetterSetter;
|
||||||
import cpm.com.gskmtorange.xmlGetterSetter.MappingPromotionGetterSetter;
|
import cpm.com.gskmtorange.xmlGetterSetter.MappingPromotionGetterSetter;
|
||||||
@@ -65,6 +68,8 @@ import cpm.com.gskmtorange.xmlGetterSetter.NonWorkingReasonGetterSetter;
|
|||||||
import cpm.com.gskmtorange.xmlGetterSetter.NonWorkingSubReasonGetterSetter;
|
import cpm.com.gskmtorange.xmlGetterSetter.NonWorkingSubReasonGetterSetter;
|
||||||
import cpm.com.gskmtorange.xmlGetterSetter.POGGetterSetter;
|
import cpm.com.gskmtorange.xmlGetterSetter.POGGetterSetter;
|
||||||
import cpm.com.gskmtorange.xmlGetterSetter.POGQuestionGetterSetter;
|
import cpm.com.gskmtorange.xmlGetterSetter.POGQuestionGetterSetter;
|
||||||
|
import cpm.com.gskmtorange.xmlGetterSetter.PharmaMSLInsertedGetterSetter;
|
||||||
|
import cpm.com.gskmtorange.xmlGetterSetter.PharmaSOSGetterSetter;
|
||||||
import cpm.com.gskmtorange.xmlGetterSetter.PromoComplianceSkuwiseGetterSetter;
|
import cpm.com.gskmtorange.xmlGetterSetter.PromoComplianceSkuwiseGetterSetter;
|
||||||
import cpm.com.gskmtorange.xmlGetterSetter.Promo_Compliance_DataGetterSetter;
|
import cpm.com.gskmtorange.xmlGetterSetter.Promo_Compliance_DataGetterSetter;
|
||||||
import cpm.com.gskmtorange.xmlGetterSetter.RowColumnGetterSetter;
|
import cpm.com.gskmtorange.xmlGetterSetter.RowColumnGetterSetter;
|
||||||
@@ -87,7 +92,7 @@ import cpm.com.gskmtorange.xmlGetterSetter.TableBean;
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
public class GSKOrangeDB extends SQLiteOpenHelper {
|
public class GSKOrangeDB extends SQLiteOpenHelper {
|
||||||
public static final String DATABASE_NAME = "GSK_ORANGE_DB49";
|
public static final String DATABASE_NAME = "GSK_ORANGE_DB57";
|
||||||
public static final int DATABASE_VERSION = 15;
|
public static final int DATABASE_VERSION = 15;
|
||||||
TableBean tableBean;
|
TableBean tableBean;
|
||||||
private SQLiteDatabase db;
|
private SQLiteDatabase db;
|
||||||
@@ -209,6 +214,19 @@ public class GSKOrangeDB extends SQLiteOpenHelper {
|
|||||||
db.execSQL(CommonString.CREATE_ABLE_IS_ADHOC_SAVED);//--Added 20.02.2019
|
db.execSQL(CommonString.CREATE_ABLE_IS_ADHOC_SAVED);//--Added 20.02.2019
|
||||||
db.execSQL(CommonString.CREATE_TABLE_INSERT_COUNTERFEIT_PRODUCT_EXISTS);//--Added 12.03.2019
|
db.execSQL(CommonString.CREATE_TABLE_INSERT_COUNTERFEIT_PRODUCT_EXISTS);//--Added 12.03.2019
|
||||||
db.execSQL(CommonString.CREATE_TABLE_INSERT_COUNTERFEIT_PRODUCT);//--Added 12.03.2019
|
db.execSQL(CommonString.CREATE_TABLE_INSERT_COUNTERFEIT_PRODUCT);//--Added 12.03.2019
|
||||||
|
db.execSQL(CommonString.CREATE_TABLE_INSERT_STOCK);//--Added 03.04.2019
|
||||||
|
|
||||||
|
db.execSQL(TableBean.getAdditionalJourneyPlan());//--Added 8.04.2019
|
||||||
|
db.execSQL(TableBean.getMappingStockAdditional());//--Added 8.04.2019
|
||||||
|
|
||||||
|
db.execSQL(TableBean.getTable_JOURNEY_PLAN_PHARMA());//--Added 12.04.2019
|
||||||
|
db.execSQL(TableBean.getTable_MAPPING_PHARMA_QUESTION());//--Added 12.04.2019
|
||||||
|
|
||||||
|
db.execSQL(CommonString.CREATE_TABLE_INSERT_STORE_PROFILE_DATA);//--Added 25.04.2019
|
||||||
|
db.execSQL(CommonString.CREATE_TABLE_INSERT_SOS_PHARMA_DATA);//--Added 29.04.2019
|
||||||
|
db.execSQL(CommonString.CREATE_TABLE_INSERT_PHARMA_MSL_DATA);//--Added 30.04.2019
|
||||||
|
db.execSQL(TableBean.getTable_MAPPING_PHARMA_MSL());//--Added 16.05.2019
|
||||||
|
db.execSQL(CommonString.CREATE_TABLE_INSERT_PHARMA_IMAGE_DATA);//--Added 20.05.2019
|
||||||
|
|
||||||
} catch (SQLException e) {
|
} catch (SQLException e) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
@@ -268,6 +286,10 @@ public class GSKOrangeDB extends SQLiteOpenHelper {
|
|||||||
db.delete(CommonString.TABLE_COACHING_VISIT, "STORE_ID" + "='" + storeid + "'", null);
|
db.delete(CommonString.TABLE_COACHING_VISIT, "STORE_ID" + "='" + storeid + "'", null);
|
||||||
db.delete(CommonString.TABLE_INSERT_COUNTERFEIT_PRODUCT_EXISTS, "STORE_ID" + "='" + storeid + "'", null);
|
db.delete(CommonString.TABLE_INSERT_COUNTERFEIT_PRODUCT_EXISTS, "STORE_ID" + "='" + storeid + "'", null);
|
||||||
db.delete(CommonString.TABLE_INSERT_COUNTERFEIT_PRODUCT, "STORE_ID" + "='" + storeid + "'", null);
|
db.delete(CommonString.TABLE_INSERT_COUNTERFEIT_PRODUCT, "STORE_ID" + "='" + storeid + "'", null);
|
||||||
|
db.delete(CommonString.TABLE_INSERT_STOCK, "Store_Id" + "='" + storeid + "'", null);
|
||||||
|
db.delete(CommonString.TABLE_INSERT_PHARMA_MSL_DATA, "Store_Id" + "='" + storeid + "'", null);
|
||||||
|
db.delete(CommonString.TABLE_INSERT_SOS_PHARMA_DATA, "Store_Id" + "='" + storeid + "'", null);
|
||||||
|
db.delete(CommonString.TABLE_INSERT_STORE_PROFILE_DATA, "Store_Id" + "='" + storeid + "'", null);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -833,16 +855,18 @@ public class GSKOrangeDB extends SQLiteOpenHelper {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public void updateDataStatus(String id, String status, String table_name) {
|
public void updateDataStatus(GeotaggingBeans geoTagData, String status, String table_name) {
|
||||||
|
|
||||||
ContentValues values = new ContentValues();
|
ContentValues values = new ContentValues();
|
||||||
|
|
||||||
try {
|
try {
|
||||||
|
|
||||||
values.put("GEO_TAG", status);
|
values.put("GEO_TAG", status);
|
||||||
|
values.put("LATITUDE", geoTagData.getLatitude());
|
||||||
|
values.put("LONGITUDE", geoTagData.getLongitude());
|
||||||
|
|
||||||
db.update(table_name, values,
|
db.update(table_name, values,
|
||||||
CommonString.KEY_STORE_ID + "='" + id + "'", null);
|
CommonString.KEY_STORE_ID + "='" + geoTagData.getStoreid() + "'", null);
|
||||||
|
|
||||||
} catch (Exception ex) {
|
} catch (Exception ex) {
|
||||||
|
|
||||||
@@ -964,6 +988,7 @@ public class GSKOrangeDB extends SQLiteOpenHelper {
|
|||||||
values.put("SUB_CATEGORY", data.getSUB_CATEGORY().get(i));
|
values.put("SUB_CATEGORY", data.getSUB_CATEGORY().get(i));
|
||||||
values.put("CATEGORY_ID", data.getCATEGORY_ID().get(i));
|
values.put("CATEGORY_ID", data.getCATEGORY_ID().get(i));
|
||||||
values.put("SUB_CATEGORY_SEQUENCE", data.getSUB_CATEGORY_SEQUENCE().get(i));
|
values.put("SUB_CATEGORY_SEQUENCE", data.getSUB_CATEGORY_SEQUENCE().get(i));
|
||||||
|
values.put("SUB_CATEGORY_SEQUENCE_SA", data.getSUB_CATEGORY_SEQUENCE_SA().get(i));
|
||||||
|
|
||||||
db.insert("SUB_CATEGORY_MASTER", null, values);
|
db.insert("SUB_CATEGORY_MASTER", null, values);
|
||||||
}
|
}
|
||||||
@@ -984,6 +1009,7 @@ public class GSKOrangeDB extends SQLiteOpenHelper {
|
|||||||
values.put("SUB_CATEGORY_ID", data.getSUB_CATEGORY_ID().get(i));
|
values.put("SUB_CATEGORY_ID", data.getSUB_CATEGORY_ID().get(i));
|
||||||
values.put("COMPANY_ID", data.getCOMPANY_ID().get(i));
|
values.put("COMPANY_ID", data.getCOMPANY_ID().get(i));
|
||||||
values.put("BRAND_SEQUENCE", data.getBRAND_SEQUENCE().get(i));
|
values.put("BRAND_SEQUENCE", data.getBRAND_SEQUENCE().get(i));
|
||||||
|
values.put("BRAND_SEQUENCE_SA", data.getBRAND_SEQUENCE_SA().get(i));
|
||||||
|
|
||||||
db.insert("BRAND_MASTER", null, values);
|
db.insert("BRAND_MASTER", null, values);
|
||||||
}
|
}
|
||||||
@@ -1005,6 +1031,7 @@ public class GSKOrangeDB extends SQLiteOpenHelper {
|
|||||||
values.put("MRP", data.getMRP().get(i));
|
values.put("MRP", data.getMRP().get(i));
|
||||||
values.put("SKU_SEQUENCE", data.getSKU_SEQUENCE().get(i));
|
values.put("SKU_SEQUENCE", data.getSKU_SEQUENCE().get(i));
|
||||||
values.put("PROMO_SKU", data.getPROMO_SKU().get(i));
|
values.put("PROMO_SKU", data.getPROMO_SKU().get(i));
|
||||||
|
values.put("SKU_SEQUENCE_SA", data.getSKU_SEQUENCE_SA().get(i));
|
||||||
|
|
||||||
db.insert("SKU_MASTER", null, values);
|
db.insert("SKU_MASTER", null, values);
|
||||||
}
|
}
|
||||||
@@ -1997,6 +2024,10 @@ public class GSKOrangeDB extends SQLiteOpenHelper {
|
|||||||
|
|
||||||
if (flag_from.equals(CommonString.FROM_JCP)) {
|
if (flag_from.equals(CommonString.FROM_JCP)) {
|
||||||
table = CommonString.KEY_JOURNEY_PLAN;
|
table = CommonString.KEY_JOURNEY_PLAN;
|
||||||
|
} else if (flag_from.equals(CommonString.FROM_ADDITIONAL)) {
|
||||||
|
table = CommonString.KEY_JOURNEY_PLAN_ADDITIONAL;
|
||||||
|
}else if (flag_from.equals(CommonString.FROM_PHARMA)) {
|
||||||
|
table = CommonString.KEY_JOURNEY_PLAN_PHARMA;
|
||||||
} else {
|
} else {
|
||||||
table = CommonString.KEY_ADHOC_JOURNEY_PLAN;
|
table = CommonString.KEY_ADHOC_JOURNEY_PLAN;
|
||||||
}
|
}
|
||||||
@@ -2023,7 +2054,11 @@ public class GSKOrangeDB extends SQLiteOpenHelper {
|
|||||||
if (flag_from != null) {
|
if (flag_from != null) {
|
||||||
if (flag_from.equals(CommonString.FROM_JCP)) {
|
if (flag_from.equals(CommonString.FROM_JCP)) {
|
||||||
table = CommonString.KEY_JOURNEY_PLAN;
|
table = CommonString.KEY_JOURNEY_PLAN;
|
||||||
} else {
|
} else if (flag_from.equals(CommonString.FROM_ADDITIONAL)) {
|
||||||
|
table = CommonString.KEY_JOURNEY_PLAN_ADDITIONAL;
|
||||||
|
} else if (flag_from.equals(CommonString.FROM_PHARMA)) {
|
||||||
|
table = CommonString.KEY_JOURNEY_PLAN_PHARMA;
|
||||||
|
}else{
|
||||||
table = CommonString.KEY_ADHOC_JOURNEY_PLAN;
|
table = CommonString.KEY_ADHOC_JOURNEY_PLAN;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
@@ -2400,8 +2435,8 @@ public class GSKOrangeDB extends SQLiteOpenHelper {
|
|||||||
Cursor dbcursor = null;
|
Cursor dbcursor = null;
|
||||||
|
|
||||||
try {
|
try {
|
||||||
dbcursor = db.rawQuery("Select * from STORE_PERFORMANCE_NEW " +
|
dbcursor = db.rawQuery("Select * from " + tableName +
|
||||||
"where STORE_ID='" + store_id + "' and CATEGORY_ID='" + category_id + "'", null);
|
" where STORE_ID='" + store_id + "' and CATEGORY_ID='" + category_id + "'", null);
|
||||||
|
|
||||||
if (dbcursor != null) {
|
if (dbcursor != null) {
|
||||||
dbcursor.moveToFirst();
|
dbcursor.moveToFirst();
|
||||||
@@ -4601,7 +4636,7 @@ public class GSKOrangeDB extends SQLiteOpenHelper {
|
|||||||
|
|
||||||
try {
|
try {
|
||||||
|
|
||||||
cursordata = db.rawQuery("Select * from Stock_CATEGORY_PICTURE " + "where categoryId='" + categoryId + "' and Store_Id='" + store_id + "'", null);
|
cursordata = db.rawQuery("Select * from Stock_CATEGORY_PICTURE " + "where categoryId='" + categoryId + "' and Store_Id='" + store_id + "'", null);
|
||||||
|
|
||||||
if (cursordata != null) {
|
if (cursordata != null) {
|
||||||
cursordata.moveToFirst();
|
cursordata.moveToFirst();
|
||||||
@@ -4940,14 +4975,14 @@ public class GSKOrangeDB extends SQLiteOpenHelper {
|
|||||||
return list;
|
return list;
|
||||||
}
|
}
|
||||||
|
|
||||||
public ArrayList<CoverageBean> getCoverageWithStoreID_Data(String store_id) {
|
public ArrayList<CoverageBean> getCoverageWithStoreID_Data(String store_id, String visitDate) {
|
||||||
|
|
||||||
ArrayList<CoverageBean> list = new ArrayList<CoverageBean>();
|
ArrayList<CoverageBean> list = new ArrayList<CoverageBean>();
|
||||||
Cursor dbcursor = null;
|
Cursor dbcursor = null;
|
||||||
|
|
||||||
try {
|
try {
|
||||||
|
|
||||||
dbcursor = db.rawQuery("SELECT * from " + CommonString.TABLE_COVERAGE_DATA + " where " + CommonString.KEY_STORE_ID + "='" + store_id + "'",
|
dbcursor = db.rawQuery("SELECT * from " + CommonString.TABLE_COVERAGE_DATA + " where " + CommonString.KEY_STORE_ID + "='" + store_id + "' AND " + CommonString.KEY_VISIT_DATE + "='" + visitDate + "'",
|
||||||
null);
|
null);
|
||||||
|
|
||||||
|
|
||||||
@@ -4989,6 +5024,8 @@ public class GSKOrangeDB extends SQLiteOpenHelper {
|
|||||||
.getColumnIndexOrThrow(CommonString.KEY_COVERAGE_REMARK))))));
|
.getColumnIndexOrThrow(CommonString.KEY_COVERAGE_REMARK))))));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
sb.setFlag_from(dbcursor.getString(dbcursor.getColumnIndexOrThrow(CommonString.KEY_STORE_FLAG)));
|
||||||
|
|
||||||
list.add(sb);
|
list.add(sb);
|
||||||
dbcursor.moveToNext();
|
dbcursor.moveToNext();
|
||||||
}
|
}
|
||||||
@@ -5108,7 +5145,7 @@ public class GSKOrangeDB extends SQLiteOpenHelper {
|
|||||||
"inner join CATEGORY_MASTER CA " +
|
"inner join CATEGORY_MASTER CA " +
|
||||||
"on SB.CATEGORY_ID=CA.CATEGORY_ID " +
|
"on SB.CATEGORY_ID=CA.CATEGORY_ID " +
|
||||||
"where CA.CATEGORY_ID='" + category_id + "' AND M.STORE_ID = '" + store_id + "'" +
|
"where CA.CATEGORY_ID='" + category_id + "' AND M.STORE_ID = '" + store_id + "'" +
|
||||||
" order by SB.SUB_CATEGORY, BR.COMPANY_ID,BR.BRAND_SEQUENCE", null);
|
" order by SB.SUB_CATEGORY_SEQUENCE_SA, BR.BRAND_SEQUENCE_SA", null);
|
||||||
//" order by SB.SUB_CATEGORY,BR.COMPANY_ID,BR.BRAND, BR.BRAND_SEQUENCE", null);
|
//" order by SB.SUB_CATEGORY,BR.COMPANY_ID,BR.BRAND, BR.BRAND_SEQUENCE", null);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -5191,7 +5228,8 @@ public class GSKOrangeDB extends SQLiteOpenHelper {
|
|||||||
"inner join CATEGORY_MASTER CA " +
|
"inner join CATEGORY_MASTER CA " +
|
||||||
"on SB.CATEGORY_ID=CA.CATEGORY_ID " +
|
"on SB.CATEGORY_ID=CA.CATEGORY_ID " +
|
||||||
"where CA.CATEGORY_ID='" + category_id + "' AND BR.BRAND_ID='" + brand_id +
|
"where CA.CATEGORY_ID='" + category_id + "' AND BR.BRAND_ID='" + brand_id +
|
||||||
"' AND M.STORE_ID = '" + store_id + "' order by M.MUST_HAVE DESC", null);
|
"' AND M.STORE_ID = '" + store_id + "' order by SK.SKU_SEQUENCE_SA", null);
|
||||||
|
//"' AND M.STORE_ID = '" + store_id + "' order by M.MUST_HAVE DESC", null);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -7558,4 +7596,766 @@ public class GSKOrangeDB extends SQLiteOpenHelper {
|
|||||||
return Data;
|
return Data;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@SuppressLint("LongLogTag")
|
||||||
|
public boolean checkStockData(String store_id, String category_id) {
|
||||||
|
Log.d("MSL_Availability ", "Stock data--------------->Start<------------");
|
||||||
|
ArrayList<MSL_AvailabilityStockFacingGetterSetter> list = new ArrayList<>();
|
||||||
|
Cursor dbcursor = null;
|
||||||
|
|
||||||
|
try {
|
||||||
|
dbcursor = db.rawQuery("Select * from " + CommonString.TABLE_INSERT_STOCK +
|
||||||
|
" where category_id='" + category_id + "' and Store_Id='" + store_id + "'", null);
|
||||||
|
|
||||||
|
if (dbcursor != null) {
|
||||||
|
if (dbcursor.moveToFirst()) {
|
||||||
|
do {
|
||||||
|
MSL_AvailabilityStockFacingGetterSetter sb = new MSL_AvailabilityStockFacingGetterSetter();
|
||||||
|
|
||||||
|
sb.setSku_id(dbcursor.getString(dbcursor.getColumnIndexOrThrow("SKU_ID")));
|
||||||
|
list.add(sb);
|
||||||
|
} while (dbcursor.moveToNext());
|
||||||
|
}
|
||||||
|
dbcursor.close();
|
||||||
|
|
||||||
|
return list.size() > 0;
|
||||||
|
}
|
||||||
|
} catch (Exception e) {
|
||||||
|
Log.d("Exception ", "when fetching Records!!!!!!!!!!!!!!!!!!!!!" + e.toString());
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
Log.d("MSL_Availability_StockFacing ", "midday---------------------->Stop<-----------");
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
//--------------------------------------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
public void updateStockData(
|
||||||
|
String storeId, String categoryId, List<MSL_AvailabilityStockFacingGetterSetter> hashMapListHeaderData,
|
||||||
|
HashMap<MSL_AvailabilityStockFacingGetterSetter, List<MSL_AvailabilityStockFacingGetterSetter>> hashMapListChildData) {
|
||||||
|
|
||||||
|
ContentValues values = new ContentValues();
|
||||||
|
|
||||||
|
try {
|
||||||
|
db.beginTransaction();
|
||||||
|
for (int i = 0; i < hashMapListHeaderData.size(); i++) {
|
||||||
|
|
||||||
|
for (int j = 0; j < hashMapListChildData.get(hashMapListHeaderData.get(i)).size(); j++) {
|
||||||
|
MSL_AvailabilityStockFacingGetterSetter data = hashMapListChildData.get(hashMapListHeaderData.get(i)).get(j);
|
||||||
|
|
||||||
|
values.put("TOGGLE_VALUE", data.getToggleValue());
|
||||||
|
values.put("STOCK", data.getStock());
|
||||||
|
|
||||||
|
db.update(CommonString.TABLE_INSERT_STOCK, values,
|
||||||
|
"Brand_Id ='" + hashMapListHeaderData.get(i).getBrand_id() + "' AND SKU_ID ='" + data.getSku_id() +
|
||||||
|
"' AND Category_Id='" + categoryId + "' AND Store_Id='" + storeId + "'", null);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
db.setTransactionSuccessful();
|
||||||
|
db.endTransaction();
|
||||||
|
} catch (Exception ex) {
|
||||||
|
Log.d("Exception ", " in Insert Stock " + ex.toString());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
//-------------------------------------------------------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
public void InsertStockData(
|
||||||
|
String storeId, String categoryId, List<MSL_AvailabilityStockFacingGetterSetter> hashMapListHeaderData,
|
||||||
|
HashMap<MSL_AvailabilityStockFacingGetterSetter, List<MSL_AvailabilityStockFacingGetterSetter>> hashMapListChildData) {
|
||||||
|
ContentValues values = new ContentValues();
|
||||||
|
|
||||||
|
try {
|
||||||
|
db.beginTransaction();
|
||||||
|
for (int i = 0; i < hashMapListHeaderData.size(); i++) {
|
||||||
|
|
||||||
|
for (int j = 0; j < hashMapListChildData.get(hashMapListHeaderData.get(i)).size(); j++) {
|
||||||
|
MSL_AvailabilityStockFacingGetterSetter data = hashMapListChildData.get(hashMapListHeaderData.get(i)).get(j);
|
||||||
|
|
||||||
|
values.put("Store_Id", storeId);
|
||||||
|
values.put("Category_Id", categoryId);
|
||||||
|
values.put("Brand_Id", hashMapListHeaderData.get(i).getBrand_id());
|
||||||
|
values.put("SKU_ID", data.getSku_id());
|
||||||
|
values.put("SKU", data.getSku());
|
||||||
|
values.put("SKU_SEQUENCE", data.getSku_sequence());
|
||||||
|
values.put("MBQ", data.getMbq());
|
||||||
|
values.put("TOGGLE_VALUE", data.getToggleValue());
|
||||||
|
values.put("STOCK", data.getStock());
|
||||||
|
values.put("COMPANY_ID", data.getCompany_id());
|
||||||
|
values.put("MUST_HAVE", data.getMust_have());
|
||||||
|
|
||||||
|
db.insert(CommonString.TABLE_INSERT_STOCK, null, values);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
db.setTransactionSuccessful();
|
||||||
|
db.endTransaction();
|
||||||
|
} catch (Exception ex) {
|
||||||
|
Log.d("Exception ", " in Insert Stock" + ex.toString());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
//---------------------------------------------------------------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
public ArrayList<MSL_AvailabilityStockFacingGetterSetter> getStockAfterSaveData(
|
||||||
|
String category_id, String brand_id, String store_id) {
|
||||||
|
|
||||||
|
ArrayList<MSL_AvailabilityStockFacingGetterSetter> list = new ArrayList<>();
|
||||||
|
Cursor dbcursor = null;
|
||||||
|
|
||||||
|
try {
|
||||||
|
dbcursor = db.rawQuery("Select * from " + CommonString.TABLE_INSERT_STOCK +
|
||||||
|
" where category_id='" + category_id + "' and Brand_Id='" + brand_id + "' AND Store_Id='" + store_id + "'", null);
|
||||||
|
|
||||||
|
if (dbcursor != null) {
|
||||||
|
dbcursor.moveToFirst();
|
||||||
|
while (!dbcursor.isAfterLast()) {
|
||||||
|
MSL_AvailabilityStockFacingGetterSetter cd = new MSL_AvailabilityStockFacingGetterSetter();
|
||||||
|
|
||||||
|
cd.setSku_id(dbcursor.getString(dbcursor.getColumnIndexOrThrow("SKU_ID")));
|
||||||
|
cd.setSku(dbcursor.getString(dbcursor.getColumnIndexOrThrow("SKU")));
|
||||||
|
cd.setSku_sequence(dbcursor.getString(dbcursor.getColumnIndexOrThrow("SKU_SEQUENCE")));
|
||||||
|
cd.setMbq(dbcursor.getString(dbcursor.getColumnIndexOrThrow("MBQ")));
|
||||||
|
cd.setToggleValue(dbcursor.getString(dbcursor.getColumnIndexOrThrow("TOGGLE_VALUE")));
|
||||||
|
cd.setStock(dbcursor.getString(dbcursor.getColumnIndexOrThrow("STOCK")));
|
||||||
|
cd.setCompany_id(dbcursor.getString(dbcursor.getColumnIndexOrThrow("COMPANY_ID")));
|
||||||
|
cd.setMust_have(dbcursor.getString(dbcursor.getColumnIndexOrThrow("MUST_HAVE")));
|
||||||
|
|
||||||
|
list.add(cd);
|
||||||
|
dbcursor.moveToNext();
|
||||||
|
}
|
||||||
|
dbcursor.close();
|
||||||
|
return list;
|
||||||
|
}
|
||||||
|
} catch (Exception e) {
|
||||||
|
Log.d("Exception ", "get MSL_Availability Sku After Save Data!" + e.toString());
|
||||||
|
return list;
|
||||||
|
}
|
||||||
|
return list;
|
||||||
|
}
|
||||||
|
|
||||||
|
//Insert Additional Journey Plan
|
||||||
|
public void InsertAdditionalJCP(JourneyPlanGetterSetter data) {
|
||||||
|
db.delete("JOURNEY_PLAN_ADDITIONAL", null, null);
|
||||||
|
|
||||||
|
ContentValues values = new ContentValues();
|
||||||
|
try {
|
||||||
|
|
||||||
|
for (int i = 0; i < data.getSTORE_ID().size(); i++) {
|
||||||
|
|
||||||
|
values.put("STORE_ID", data.getSTORE_ID().get(i));
|
||||||
|
values.put("EMP_ID", data.getEMP_ID().get(i));
|
||||||
|
|
||||||
|
values.put("STORE_NAME", data.getSTORE_NAME().get(i));
|
||||||
|
|
||||||
|
values.put("CITY", data.getCITY().get(i));
|
||||||
|
|
||||||
|
values.put("VISIT_DATE", data.getVISIT_DATE().get(i));
|
||||||
|
|
||||||
|
values.put("ADDRESS", data.getADDRESS().get(i));
|
||||||
|
|
||||||
|
values.put("UPLOAD_STATUS", data.getUPLOAD_STATUS().get(i));
|
||||||
|
|
||||||
|
values.put("STORETYPE", data.getSTORETYPE().get(i));
|
||||||
|
|
||||||
|
values.put("KEYACCOUNT_ID", data.getKEYACCOUNT_ID().get(i));
|
||||||
|
|
||||||
|
|
||||||
|
values.put("STORETYPE_ID", data.getSTORETYPE_ID().get(i));
|
||||||
|
|
||||||
|
values.put("CHECKOUT_STATUS", data.getCHECKOUT_STATUS().get(i));
|
||||||
|
|
||||||
|
values.put("CLASSIFICATION", data.getCLASSIFICATION().get(i));
|
||||||
|
|
||||||
|
values.put("KEYACCOUNT", data.getKEYACCOUNT().get(i));
|
||||||
|
values.put("CLASS_ID", data.getCLASS_ID().get(i));
|
||||||
|
|
||||||
|
values.put("CAMERA_ALLOW", data.getCAMERA_ALLOW().get(i));
|
||||||
|
values.put("GEO_TAG", data.getGEO_TAG().get(i));
|
||||||
|
|
||||||
|
values.put("VISIT_ORDER", data.getVISIT_ORDER().get(i));
|
||||||
|
values.put("LATITUDE", data.getLATITUDE().get(i));
|
||||||
|
values.put("LONGITUDE", data.getLONGITUDE().get(i));
|
||||||
|
values.put("POG_TYPE_ID", data.getPOG_TYPE_ID().get(i));
|
||||||
|
|
||||||
|
db.insert("JOURNEY_PLAN_ADDITIONAL", null, values);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
} catch (Exception ex) {
|
||||||
|
Log.d("Exception in ADHOC_JCP", ex.toString());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
//MSL_Availability_StockFacing Server Upload Data
|
||||||
|
public ArrayList<MSL_AvailabilityStockFacingGetterSetter> getStockUploadServerData(String store_id) {
|
||||||
|
ArrayList<MSL_AvailabilityStockFacingGetterSetter> list = new ArrayList<>();
|
||||||
|
Cursor dbcursor = null;
|
||||||
|
|
||||||
|
try {
|
||||||
|
dbcursor = db.rawQuery("Select * from " + CommonString.TABLE_INSERT_STOCK +
|
||||||
|
" where Store_Id='" + store_id + "'", null);
|
||||||
|
|
||||||
|
if (dbcursor != null) {
|
||||||
|
dbcursor.moveToFirst();
|
||||||
|
while (!dbcursor.isAfterLast()) {
|
||||||
|
MSL_AvailabilityStockFacingGetterSetter cd = new MSL_AvailabilityStockFacingGetterSetter();
|
||||||
|
|
||||||
|
cd.setCategory_id(dbcursor.getString(dbcursor.getColumnIndexOrThrow("Category_Id")));
|
||||||
|
cd.setBrand_id(dbcursor.getString(dbcursor.getColumnIndexOrThrow("Brand_Id")));
|
||||||
|
cd.setSku_id(dbcursor.getString(dbcursor.getColumnIndexOrThrow("SKU_ID")));
|
||||||
|
cd.setSku(dbcursor.getString(dbcursor.getColumnIndexOrThrow("SKU")));
|
||||||
|
cd.setSku_sequence(dbcursor.getString(dbcursor.getColumnIndexOrThrow("SKU_SEQUENCE")));
|
||||||
|
cd.setMbq(dbcursor.getString(dbcursor.getColumnIndexOrThrow("MBQ")));
|
||||||
|
cd.setToggleValue(dbcursor.getString(dbcursor.getColumnIndexOrThrow("TOGGLE_VALUE")));
|
||||||
|
cd.setStock(dbcursor.getString(dbcursor.getColumnIndexOrThrow("STOCK")));
|
||||||
|
cd.setMust_have(dbcursor.getString(dbcursor.getColumnIndexOrThrow("MUST_HAVE")));
|
||||||
|
|
||||||
|
list.add(cd);
|
||||||
|
dbcursor.moveToNext();
|
||||||
|
}
|
||||||
|
dbcursor.close();
|
||||||
|
return list;
|
||||||
|
}
|
||||||
|
} catch (Exception e) {
|
||||||
|
Log.d("Exception ", "get MSL_Availability server upload Data!" + e.toString());
|
||||||
|
return list;
|
||||||
|
}
|
||||||
|
return list;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void insertMappingPahrmaQuestion(MappingPharmaQuestionGetterSetter data) {
|
||||||
|
db.delete("MAPPING_PHARMA_QUESTION", null, null);
|
||||||
|
|
||||||
|
ContentValues values = new ContentValues();
|
||||||
|
try {
|
||||||
|
for (int i = 0; i < data.getQUESTION_ID().size(); i++) {
|
||||||
|
|
||||||
|
values.put("QUESTION_ID", data.getQUESTION_ID().get(i));
|
||||||
|
values.put("QUESTION", data.getQUESTION().get(i));
|
||||||
|
values.put("BRAND_ID", data.getBRAND_ID().get(i));
|
||||||
|
values.put("BRAND", data.getBRAND().get(i));
|
||||||
|
values.put("SUB_CATEGORY_ID", data.getSUB_CATEGORY_ID().get(i));
|
||||||
|
values.put("SUB_CATEGORY", data.getSUB_CATEGORY().get(i));
|
||||||
|
values.put("QUESTION_SEQUENCE", data.getQUESTION_SEQUENCE().get(i));
|
||||||
|
|
||||||
|
db.insert("MAPPING_PHARMA_QUESTION", null, values);
|
||||||
|
}
|
||||||
|
} catch (Exception ex) {
|
||||||
|
Log.d("Exception ", " in MAPPING_PHARMA_QUESTION " + ex.toString());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
//Insert PHARMA Journey Plan
|
||||||
|
public void InsertPharmaJCP(JourneyPlanGetterSetter data) {
|
||||||
|
db.delete("JOURNEY_PLAN_PHARMA", null, null);
|
||||||
|
|
||||||
|
ContentValues values = new ContentValues();
|
||||||
|
try {
|
||||||
|
|
||||||
|
for (int i = 0; i < data.getSTORE_ID().size(); i++) {
|
||||||
|
|
||||||
|
values.put("STORE_ID", data.getSTORE_ID().get(i));
|
||||||
|
values.put("EMP_ID", data.getEMP_ID().get(i));
|
||||||
|
|
||||||
|
values.put("STORE_NAME", data.getSTORE_NAME().get(i));
|
||||||
|
|
||||||
|
values.put("CITY", data.getCITY().get(i));
|
||||||
|
|
||||||
|
values.put("VISIT_DATE", data.getVISIT_DATE().get(i));
|
||||||
|
|
||||||
|
values.put("ADDRESS", data.getADDRESS().get(i));
|
||||||
|
|
||||||
|
values.put("UPLOAD_STATUS", data.getUPLOAD_STATUS().get(i));
|
||||||
|
|
||||||
|
values.put("STORETYPE", data.getSTORETYPE().get(i));
|
||||||
|
|
||||||
|
values.put("KEYACCOUNT_ID", data.getKEYACCOUNT_ID().get(i));
|
||||||
|
|
||||||
|
|
||||||
|
values.put("STORETYPE_ID", data.getSTORETYPE_ID().get(i));
|
||||||
|
|
||||||
|
values.put("CHECKOUT_STATUS", data.getCHECKOUT_STATUS().get(i));
|
||||||
|
|
||||||
|
values.put("CLASSIFICATION", data.getCLASSIFICATION().get(i));
|
||||||
|
|
||||||
|
values.put("KEYACCOUNT", data.getKEYACCOUNT().get(i));
|
||||||
|
values.put("CLASS_ID", data.getCLASS_ID().get(i));
|
||||||
|
|
||||||
|
values.put("CAMERA_ALLOW", data.getCAMERA_ALLOW().get(i));
|
||||||
|
values.put("GEO_TAG", data.getGEO_TAG().get(i));
|
||||||
|
|
||||||
|
values.put("VISIT_ORDER", data.getVISIT_ORDER().get(i));
|
||||||
|
values.put("LATITUDE", data.getLATITUDE().get(i));
|
||||||
|
values.put("LONGITUDE", data.getLONGITUDE().get(i));
|
||||||
|
values.put("POG_TYPE_ID", data.getPOG_TYPE_ID().get(i));
|
||||||
|
|
||||||
|
db.insert("JOURNEY_PLAN_PHARMA", null, values);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
} catch (Exception ex) {
|
||||||
|
Log.d("Exception in ADHOC_JCP", ex.toString());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// get MAPPING_PHARMA_QUESTION Data
|
||||||
|
public ArrayList<MappingPharmaQuestionGetterSetter> getPharmaQuestionsData() {
|
||||||
|
|
||||||
|
ArrayList<MappingPharmaQuestionGetterSetter> list = new ArrayList<>();
|
||||||
|
Cursor dbcursor = null;
|
||||||
|
|
||||||
|
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 QUESTION_ID, QUESTION FROM MAPPING_PHARMA_QUESTION ORDER BY QUESTION_SEQUENCE", null);
|
||||||
|
|
||||||
|
if (dbcursor != null) {
|
||||||
|
dbcursor.moveToFirst();
|
||||||
|
while (!dbcursor.isAfterLast()) {
|
||||||
|
MappingPharmaQuestionGetterSetter qns = new MappingPharmaQuestionGetterSetter();
|
||||||
|
|
||||||
|
qns.setQUESTION_ID(dbcursor.getString(dbcursor.getColumnIndexOrThrow("QUESTION_ID")));
|
||||||
|
qns.setQUESTION(dbcursor.getString(dbcursor.getColumnIndexOrThrow("QUESTION")));
|
||||||
|
|
||||||
|
|
||||||
|
list.add(qns);
|
||||||
|
dbcursor.moveToNext();
|
||||||
|
}
|
||||||
|
dbcursor.close();
|
||||||
|
return list;
|
||||||
|
}
|
||||||
|
} catch (Exception e) {
|
||||||
|
|
||||||
|
Log.d("Exception ", "get Chat Message" + e.toString());
|
||||||
|
}
|
||||||
|
return list;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// get MAPPING_PHARMA_QUESTION Answer data
|
||||||
|
public ArrayList<MappingPharmaQuestionGetterSetter> getPharmaAnswerData(String questionId) {
|
||||||
|
|
||||||
|
ArrayList<MappingPharmaQuestionGetterSetter> list = new ArrayList<>();
|
||||||
|
Cursor dbcursor = null;
|
||||||
|
|
||||||
|
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 * FROM MAPPING_PHARMA_QUESTION WHERE QUESTION_ID='"+ questionId +"' ORDER BY QUESTION_SEQUENCE", null);
|
||||||
|
|
||||||
|
if (dbcursor != null) {
|
||||||
|
dbcursor.moveToFirst();
|
||||||
|
while (!dbcursor.isAfterLast()) {
|
||||||
|
MappingPharmaQuestionGetterSetter qns = new MappingPharmaQuestionGetterSetter();
|
||||||
|
|
||||||
|
qns.setQUESTION_ID(dbcursor.getString(dbcursor.getColumnIndexOrThrow("QUESTION_ID")));
|
||||||
|
qns.setQUESTION(dbcursor.getString(dbcursor.getColumnIndexOrThrow("QUESTION")));
|
||||||
|
qns.setBRAND_ID(dbcursor.getString(dbcursor.getColumnIndexOrThrow("BRAND_ID")));
|
||||||
|
qns.setBRAND(dbcursor.getString(dbcursor.getColumnIndexOrThrow("BRAND")));
|
||||||
|
qns.setSUB_CATEGORY_ID(dbcursor.getString(dbcursor.getColumnIndexOrThrow("SUB_CATEGORY_ID")));
|
||||||
|
qns.setSUB_CATEGORY(dbcursor.getString(dbcursor.getColumnIndexOrThrow("SUB_CATEGORY")));
|
||||||
|
|
||||||
|
list.add(qns);
|
||||||
|
dbcursor.moveToNext();
|
||||||
|
}
|
||||||
|
dbcursor.close();
|
||||||
|
return list;
|
||||||
|
}
|
||||||
|
} catch (Exception e) {
|
||||||
|
|
||||||
|
Log.d("Exception ", "get Chat Message" + e.toString());
|
||||||
|
}
|
||||||
|
return list;
|
||||||
|
}
|
||||||
|
|
||||||
|
//Insert Store Detail Pharma stores
|
||||||
|
public void InsertStoreDetailPharma(
|
||||||
|
String storeId, List<MappingPharmaQuestionGetterSetter> hashMapListHeaderData,
|
||||||
|
HashMap<MappingPharmaQuestionGetterSetter, List<MappingPharmaQuestionGetterSetter>> hashMapListChildData,
|
||||||
|
ImageGetterSetter imageData) {
|
||||||
|
|
||||||
|
db.delete(CommonString.TABLE_INSERT_STORE_PROFILE_DATA, CommonString.KEY_STORE_ID +"='" +storeId +"'", null);
|
||||||
|
db.delete(CommonString.TABLE_INSERT_PHARMA_IMAGE_DATA, CommonString.KEY_STORE_ID +"='" +storeId +"'", null);
|
||||||
|
|
||||||
|
ContentValues values = new ContentValues();
|
||||||
|
ContentValues values1 = new ContentValues();
|
||||||
|
|
||||||
|
values1.put(CommonString.KEY_STORE_ID, storeId);
|
||||||
|
values1.put(CommonString.KEY_IMAGE1, imageData.getImage1());
|
||||||
|
values1.put(CommonString.KEY_IMAGE2, imageData.getImage2());
|
||||||
|
values1.put(CommonString.KEY_IMAGE3, imageData.getImage3());
|
||||||
|
values1.put(CommonString.KEY_IMAGE4, imageData.getImage4());
|
||||||
|
|
||||||
|
db.insert(CommonString.TABLE_INSERT_PHARMA_IMAGE_DATA, null, values1);
|
||||||
|
|
||||||
|
try {
|
||||||
|
//db.beginTransaction();
|
||||||
|
for (int i = 0; i < hashMapListHeaderData.size(); i++) {
|
||||||
|
|
||||||
|
for (int j = 0; j < hashMapListChildData.get(hashMapListHeaderData.get(i)).size(); j++) {
|
||||||
|
MappingPharmaQuestionGetterSetter data = hashMapListChildData.get(hashMapListHeaderData.get(i)).get(j);
|
||||||
|
|
||||||
|
values.put(CommonString.KEY_STORE_ID, storeId);
|
||||||
|
values.put(CommonString.KEY_QUESTION_ID, data.getQUESTION_ID().get(0));
|
||||||
|
values.put(CommonString.KEY_QUESTION, data.getQUESTION().get(0));
|
||||||
|
values.put(CommonString.KEY_SUB_CATEGORY_ID, data.getSUB_CATEGORY_ID().get(0));
|
||||||
|
values.put(CommonString.KEY_SUB_CATEGORY, data.getSUB_CATEGORY().get(0));
|
||||||
|
values.put(CommonString.KEY_BRAND_ID, data.getBRAND_ID().get(0));
|
||||||
|
values.put(CommonString.KEY_BRAND, data.getBRAND().get(0));
|
||||||
|
values.put(CommonString.KEY_IMAGE, data.getImgPath());
|
||||||
|
values.put(CommonString.KEY_PRESENT, data.getIsChecked());
|
||||||
|
|
||||||
|
db.insert(CommonString.TABLE_INSERT_STORE_PROFILE_DATA, null, values);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
/*db.setTransactionSuccessful();
|
||||||
|
db.endTransaction();*/
|
||||||
|
} catch (Exception ex) {
|
||||||
|
Log.d("Exception ", " in Insert MSL_Availability_StockFacing " + ex.toString());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
//Get Pharma Store detail for SOS Data
|
||||||
|
public ArrayList<PharmaSOSGetterSetter> getStoreDetailPharmaForSOSData(String store_id, String questionId) {
|
||||||
|
ArrayList<PharmaSOSGetterSetter> list = new ArrayList<>();
|
||||||
|
Cursor dbcursor = null;
|
||||||
|
|
||||||
|
try {
|
||||||
|
dbcursor = db.rawQuery("Select Distinct SP.QUESTION_ID , SP.BRAND, SP.BRAND_ID, SP.SUB_CATEGORY_ID, SP.SUB_CATEGORY, ifnull(SS.GSK_FACING,'') GSK_FACING, ifnull(SS.COMPETITION_FACING,'') COMPETITION_FACING " +
|
||||||
|
" from " + CommonString.TABLE_INSERT_STORE_PROFILE_DATA +" SP LEFT JOIN "+ CommonString.TABLE_INSERT_SOS_PHARMA_DATA+
|
||||||
|
" SS ON (SP.SUB_CATEGORY_ID = SS.SUB_CATEGORY_ID) AND (SP.BRAND_ID = SS.BRAND_ID) where SP.STORE_ID ='" + store_id + "' AND SP.QUESTION_ID='"+ questionId +"' AND "+
|
||||||
|
CommonString.KEY_PRESENT +"='1'", null);
|
||||||
|
|
||||||
|
if (dbcursor != null) {
|
||||||
|
dbcursor.moveToFirst();
|
||||||
|
while (!dbcursor.isAfterLast()) {
|
||||||
|
PharmaSOSGetterSetter cd = new PharmaSOSGetterSetter();
|
||||||
|
|
||||||
|
cd.setQUESTION_ID(dbcursor.getString(dbcursor.getColumnIndexOrThrow(CommonString.KEY_QUESTION_ID)));
|
||||||
|
cd.setBRAND(dbcursor.getString(dbcursor.getColumnIndexOrThrow(CommonString.KEY_BRAND)));
|
||||||
|
cd.setBRAND_ID(dbcursor.getString(dbcursor.getColumnIndexOrThrow(CommonString.KEY_BRAND_ID)));
|
||||||
|
cd.setSUB_CATEGORY_ID(dbcursor.getString(dbcursor.getColumnIndexOrThrow(CommonString.KEY_SUB_CATEGORY_ID)));
|
||||||
|
cd.setSUB_CATEGORY(dbcursor.getString(dbcursor.getColumnIndexOrThrow(CommonString.KEY_SUB_CATEGORY)));
|
||||||
|
cd.setGskFacing(dbcursor.getString(dbcursor.getColumnIndexOrThrow(CommonString.KEY_GSK_FACING)));
|
||||||
|
cd.setCompetitorFacing(dbcursor.getString(dbcursor.getColumnIndexOrThrow(CommonString.KEY_COMPETITION_FACING)));
|
||||||
|
|
||||||
|
list.add(cd);
|
||||||
|
dbcursor.moveToNext();
|
||||||
|
}
|
||||||
|
dbcursor.close();
|
||||||
|
return list;
|
||||||
|
}
|
||||||
|
} catch (Exception e) {
|
||||||
|
Log.d("Exception ", "get SOS Question Data!" + e.toString());
|
||||||
|
return list;
|
||||||
|
}
|
||||||
|
return list;
|
||||||
|
}
|
||||||
|
|
||||||
|
//Get Pharma Store detail Question Inserted Data
|
||||||
|
public ArrayList<MappingPharmaQuestionGetterSetter> getStoreDetailPharmaQuestionInsertedData(String store_id) {
|
||||||
|
ArrayList<MappingPharmaQuestionGetterSetter> list = new ArrayList<>();
|
||||||
|
Cursor dbcursor = null;
|
||||||
|
|
||||||
|
try {
|
||||||
|
dbcursor = db.rawQuery("Select DISTINCT QUESTION_ID, QUESTION from " + CommonString.TABLE_INSERT_STORE_PROFILE_DATA +
|
||||||
|
" where "+ CommonString.KEY_STORE_ID +"='" + store_id + "'", null);
|
||||||
|
|
||||||
|
if (dbcursor != null) {
|
||||||
|
dbcursor.moveToFirst();
|
||||||
|
while (!dbcursor.isAfterLast()) {
|
||||||
|
MappingPharmaQuestionGetterSetter cd = new MappingPharmaQuestionGetterSetter();
|
||||||
|
|
||||||
|
cd.setQUESTION_ID(dbcursor.getString(dbcursor.getColumnIndexOrThrow(CommonString.KEY_QUESTION_ID)));
|
||||||
|
cd.setQUESTION(dbcursor.getString(dbcursor.getColumnIndexOrThrow(CommonString.KEY_QUESTION)));
|
||||||
|
|
||||||
|
list.add(cd);
|
||||||
|
dbcursor.moveToNext();
|
||||||
|
}
|
||||||
|
dbcursor.close();
|
||||||
|
return list;
|
||||||
|
}
|
||||||
|
} catch (Exception e) {
|
||||||
|
Log.d("Exception ", "get MSL_Availability server upload Data!" + e.toString());
|
||||||
|
return list;
|
||||||
|
}
|
||||||
|
return list;
|
||||||
|
}
|
||||||
|
|
||||||
|
//Get Pharma Store detail Answer Inserted Data
|
||||||
|
public ArrayList<MappingPharmaQuestionGetterSetter> getStoreDetailPharmaAnswerInsertedData(String store_id, String questionId) {
|
||||||
|
ArrayList<MappingPharmaQuestionGetterSetter> list = new ArrayList<>();
|
||||||
|
Cursor dbcursor = null;
|
||||||
|
|
||||||
|
try {
|
||||||
|
if(questionId==null){
|
||||||
|
dbcursor = db.rawQuery("Select * from " + CommonString.TABLE_INSERT_STORE_PROFILE_DATA +
|
||||||
|
" where "+ CommonString.KEY_STORE_ID +"='" + store_id + "'", null);
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
dbcursor = db.rawQuery("Select * from " + CommonString.TABLE_INSERT_STORE_PROFILE_DATA +
|
||||||
|
" where "+ CommonString.KEY_STORE_ID +"='" + store_id + "' AND " + CommonString.KEY_QUESTION_ID +"='"+ questionId +"'", null);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (dbcursor != null) {
|
||||||
|
dbcursor.moveToFirst();
|
||||||
|
while (!dbcursor.isAfterLast()) {
|
||||||
|
MappingPharmaQuestionGetterSetter cd = new MappingPharmaQuestionGetterSetter();
|
||||||
|
|
||||||
|
cd.setQUESTION_ID(dbcursor.getString(dbcursor.getColumnIndexOrThrow(CommonString.KEY_QUESTION_ID)));
|
||||||
|
cd.setQUESTION(dbcursor.getString(dbcursor.getColumnIndexOrThrow(CommonString.KEY_QUESTION)));
|
||||||
|
cd.setBRAND(dbcursor.getString(dbcursor.getColumnIndexOrThrow(CommonString.KEY_BRAND)));
|
||||||
|
cd.setBRAND_ID(dbcursor.getString(dbcursor.getColumnIndexOrThrow(CommonString.KEY_BRAND_ID)));
|
||||||
|
cd.setSUB_CATEGORY_ID(dbcursor.getString(dbcursor.getColumnIndexOrThrow(CommonString.KEY_SUB_CATEGORY_ID)));
|
||||||
|
cd.setSUB_CATEGORY(dbcursor.getString(dbcursor.getColumnIndexOrThrow(CommonString.KEY_SUB_CATEGORY)));
|
||||||
|
cd.setImgPath(dbcursor.getString(dbcursor.getColumnIndexOrThrow(CommonString.KEY_IMAGE)));
|
||||||
|
cd.setIsChecked(dbcursor.getInt(dbcursor.getColumnIndexOrThrow(CommonString.KEY_PRESENT)));
|
||||||
|
|
||||||
|
list.add(cd);
|
||||||
|
dbcursor.moveToNext();
|
||||||
|
}
|
||||||
|
dbcursor.close();
|
||||||
|
return list;
|
||||||
|
}
|
||||||
|
} catch (Exception e) {
|
||||||
|
Log.d("Exception ", "get MSL_Availability server upload Data!" + e.toString());
|
||||||
|
return list;
|
||||||
|
}
|
||||||
|
return list;
|
||||||
|
}
|
||||||
|
|
||||||
|
//Insert SOS Pharma stores
|
||||||
|
public void InsertSOSPharma(
|
||||||
|
String storeId, List<PharmaSOSGetterSetter> sosListData) {
|
||||||
|
|
||||||
|
db.delete(CommonString.TABLE_INSERT_SOS_PHARMA_DATA, CommonString.KEY_STORE_ID +"='" +storeId +"'", null);
|
||||||
|
|
||||||
|
ContentValues values = new ContentValues();
|
||||||
|
|
||||||
|
try {
|
||||||
|
//db.beginTransaction();
|
||||||
|
|
||||||
|
for (int j = 0; j < sosListData.size(); j++) {
|
||||||
|
PharmaSOSGetterSetter data = sosListData.get(j);
|
||||||
|
|
||||||
|
values.put(CommonString.KEY_STORE_ID, storeId);
|
||||||
|
values.put(CommonString.KEY_QUESTION_ID, data.getQUESTION_ID());
|
||||||
|
values.put(CommonString.KEY_QUESTION, data.getQUESTION());
|
||||||
|
values.put(CommonString.KEY_SUB_CATEGORY_ID, data.getSUB_CATEGORY_ID());
|
||||||
|
values.put(CommonString.KEY_SUB_CATEGORY, data.getSUB_CATEGORY());
|
||||||
|
values.put(CommonString.KEY_BRAND_ID, data.getBRAND_ID());
|
||||||
|
values.put(CommonString.KEY_BRAND, data.getBRAND());
|
||||||
|
values.put(CommonString.KEY_GSK_FACING, data.getGskFacing());
|
||||||
|
values.put(CommonString.KEY_COMPETITION_FACING, data.getCompetitorFacing());
|
||||||
|
|
||||||
|
db.insert(CommonString.TABLE_INSERT_SOS_PHARMA_DATA, null, values);
|
||||||
|
}
|
||||||
|
|
||||||
|
/*db.setTransactionSuccessful();
|
||||||
|
db.endTransaction();*/
|
||||||
|
} catch (Exception ex) {
|
||||||
|
Log.d("Exception ", " in Insert SOS Pharma " + ex.toString());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
//Insert Pharma MSL
|
||||||
|
public void InsertPharmaMSL(
|
||||||
|
String storeId, List<MSL_AvailabilityStockFacingGetterSetter> hashMapListHeaderData,
|
||||||
|
HashMap<MSL_AvailabilityStockFacingGetterSetter, List<PharmaMSLInsertedGetterSetter>> hashMapListChildData) {
|
||||||
|
|
||||||
|
db.delete(CommonString.TABLE_INSERT_PHARMA_MSL_DATA, CommonString.KEY_STORE_ID +"='" +storeId +"'", null);
|
||||||
|
|
||||||
|
ContentValues values = new ContentValues();
|
||||||
|
|
||||||
|
try {
|
||||||
|
//db.beginTransaction();
|
||||||
|
for (int i = 0; i < hashMapListHeaderData.size(); i++) {
|
||||||
|
|
||||||
|
for (int j = 0; j < hashMapListChildData.get(hashMapListHeaderData.get(i)).size(); j++) {
|
||||||
|
PharmaMSLInsertedGetterSetter data = hashMapListChildData.get(hashMapListHeaderData.get(i)).get(j);
|
||||||
|
|
||||||
|
values.put(CommonString.KEY_STORE_ID, storeId);
|
||||||
|
values.put(CommonString.KEY_BRAND_ID, hashMapListHeaderData.get(i).getBrand_id());
|
||||||
|
values.put(CommonString.KEY_SKU, data.getSku());
|
||||||
|
values.put(CommonString.KEY_SKU_ID, data.getSkuId());
|
||||||
|
values.put(CommonString.KEY_PRESENT, data.getPresent());
|
||||||
|
|
||||||
|
db.insert(CommonString.TABLE_INSERT_PHARMA_MSL_DATA, null, values);
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// db.setTransactionSuccessful();
|
||||||
|
// db.endTransaction();
|
||||||
|
} catch (Exception ex) {
|
||||||
|
Log.d("Exception ", " in Insert Pharma MSL " + ex.toString());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
//insert MAPPING_PHARMA_MSL
|
||||||
|
public void InsertMAPPING_PHARMA_MSL(MappingPharmaMSLGetterSetter data) {
|
||||||
|
db.delete("MAPPING_PHARMA_MSL", null, null);
|
||||||
|
|
||||||
|
ContentValues values = new ContentValues();
|
||||||
|
try {
|
||||||
|
for (int i = 0; i < data.getSKU_ID().size(); i++) {
|
||||||
|
|
||||||
|
values.put("COUNTRY_ID", data.getCOUNTRY_ID().get(i));
|
||||||
|
values.put("SKU_ID", data.getSKU_ID().get(i));
|
||||||
|
|
||||||
|
db.insert("MAPPING_PHARMA_MSL", null, values);
|
||||||
|
}
|
||||||
|
} catch (Exception ex) {
|
||||||
|
Log.d("Exception ", " in MAPPING_PHARMA_MSL " + ex.toString());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
//Pharma MSL Header
|
||||||
|
public ArrayList<MSL_AvailabilityStockFacingGetterSetter> getPharmaMSLHeaderData() {
|
||||||
|
|
||||||
|
ArrayList<MSL_AvailabilityStockFacingGetterSetter> list = new ArrayList<>();
|
||||||
|
Cursor dbcursor = null;
|
||||||
|
|
||||||
|
try {
|
||||||
|
|
||||||
|
dbcursor = db.rawQuery("Select DISTINCT SB.SUB_CATEGORY_ID,SB.SUB_CATEGORY,BR.BRAND_ID,BR.BRAND,BR.COMPANY_ID " +
|
||||||
|
"from MAPPING_PHARMA_MSL M " +
|
||||||
|
"inner join SKU_MASTER SK " +
|
||||||
|
"on M.SKU_ID=SK.SKU_ID " +
|
||||||
|
"inner join BRAND_MASTER BR " +
|
||||||
|
"on SK.BRAND_ID=BR.BRAND_ID " +
|
||||||
|
"inner join SUB_CATEGORY_MASTER SB " +
|
||||||
|
"on BR.SUB_CATEGORY_ID=SB.SUB_CATEGORY_ID " +
|
||||||
|
"inner join CATEGORY_MASTER CA " +
|
||||||
|
"on SB.CATEGORY_ID=CA.CATEGORY_ID " +
|
||||||
|
"where BR.COMPANY_ID='" + 1 + "' " +
|
||||||
|
"order by SB.SUB_CATEGORY,BR.COMPANY_ID,BR.BRAND", null);
|
||||||
|
|
||||||
|
if (dbcursor != null) {
|
||||||
|
dbcursor.moveToFirst();
|
||||||
|
while (!dbcursor.isAfterLast()) {
|
||||||
|
MSL_AvailabilityStockFacingGetterSetter cd = new MSL_AvailabilityStockFacingGetterSetter();
|
||||||
|
|
||||||
|
cd.setSub_category_id(dbcursor.getString(dbcursor.getColumnIndexOrThrow("SUB_CATEGORY_ID")));
|
||||||
|
cd.setSub_category(dbcursor.getString(dbcursor.getColumnIndexOrThrow("SUB_CATEGORY")));
|
||||||
|
cd.setBrand_id(dbcursor.getString(dbcursor.getColumnIndexOrThrow("BRAND_ID")));
|
||||||
|
cd.setBrand(dbcursor.getString(dbcursor.getColumnIndexOrThrow("BRAND")));
|
||||||
|
cd.setCompany_id(dbcursor.getString(dbcursor.getColumnIndexOrThrow("COMPANY_ID")));
|
||||||
|
|
||||||
|
list.add(cd);
|
||||||
|
dbcursor.moveToNext();
|
||||||
|
}
|
||||||
|
dbcursor.close();
|
||||||
|
return list;
|
||||||
|
}
|
||||||
|
} catch (Exception e) {
|
||||||
|
Log.d("Exception ", "get MSL_AvailabilityHeader!" + e.toString());
|
||||||
|
return list;
|
||||||
|
}
|
||||||
|
return list;
|
||||||
|
}
|
||||||
|
|
||||||
|
//get Pharma MSL default data
|
||||||
|
public ArrayList<PharmaMSLInsertedGetterSetter> getPharmaMSLSKUData(String brand_id) {
|
||||||
|
|
||||||
|
ArrayList<PharmaMSLInsertedGetterSetter> list = new ArrayList<>();
|
||||||
|
Cursor dbcursor = null;
|
||||||
|
|
||||||
|
try {
|
||||||
|
|
||||||
|
dbcursor = db.rawQuery("Select DISTINCT SK.SKU_ID,SK.SKU " +
|
||||||
|
"from MAPPING_PHARMA_MSL M " +
|
||||||
|
"inner join SKU_MASTER SK " +
|
||||||
|
"on M.SKU_ID=SK.SKU_ID " +
|
||||||
|
"inner join BRAND_MASTER BR " +
|
||||||
|
"on SK.BRAND_ID=BR.BRAND_ID " +
|
||||||
|
"inner join SUB_CATEGORY_MASTER SB " +
|
||||||
|
"on BR.SUB_CATEGORY_ID=SB.SUB_CATEGORY_ID " +
|
||||||
|
"inner join CATEGORY_MASTER CA " +
|
||||||
|
"on SB.CATEGORY_ID=CA.CATEGORY_ID " +
|
||||||
|
"where BR.BRAND_ID='" + brand_id +
|
||||||
|
"' order by SK.SKU_SEQUENCE ", null);
|
||||||
|
|
||||||
|
|
||||||
|
if (dbcursor != null) {
|
||||||
|
dbcursor.moveToFirst();
|
||||||
|
while (!dbcursor.isAfterLast()) {
|
||||||
|
PharmaMSLInsertedGetterSetter cd = new PharmaMSLInsertedGetterSetter();
|
||||||
|
|
||||||
|
cd.setSkuId(dbcursor.getString(dbcursor.getColumnIndexOrThrow("SKU_ID")));
|
||||||
|
cd.setSku(dbcursor.getString(dbcursor.getColumnIndexOrThrow("SKU")));
|
||||||
|
|
||||||
|
list.add(cd);
|
||||||
|
dbcursor.moveToNext();
|
||||||
|
}
|
||||||
|
dbcursor.close();
|
||||||
|
return list;
|
||||||
|
}
|
||||||
|
} catch (Exception e) {
|
||||||
|
Log.d("Exception ", "get MSL_AvailabilityHeader!" + e.toString());
|
||||||
|
return list;
|
||||||
|
}
|
||||||
|
return list;
|
||||||
|
}
|
||||||
|
|
||||||
|
//Get Pharma Store detail Image Inserted Data
|
||||||
|
public ImageGetterSetter getStoreDetailPharmaImageInsertedData(String store_id) {
|
||||||
|
ImageGetterSetter cd = new ImageGetterSetter();
|
||||||
|
Cursor dbcursor = null;
|
||||||
|
|
||||||
|
try {
|
||||||
|
dbcursor = db.rawQuery("Select * from " + CommonString.TABLE_INSERT_PHARMA_IMAGE_DATA +
|
||||||
|
" where "+ CommonString.KEY_STORE_ID +"='" + store_id + "'", null);
|
||||||
|
|
||||||
|
if (dbcursor != null) {
|
||||||
|
dbcursor.moveToFirst();
|
||||||
|
while (!dbcursor.isAfterLast()) {
|
||||||
|
|
||||||
|
cd.setImage1(dbcursor.getString(dbcursor.getColumnIndexOrThrow(CommonString.KEY_IMAGE1)));
|
||||||
|
cd.setImage2(dbcursor.getString(dbcursor.getColumnIndexOrThrow(CommonString.KEY_IMAGE2)));
|
||||||
|
cd.setImage3(dbcursor.getString(dbcursor.getColumnIndexOrThrow(CommonString.KEY_IMAGE3)));
|
||||||
|
cd.setImage4(dbcursor.getString(dbcursor.getColumnIndexOrThrow(CommonString.KEY_IMAGE4)));
|
||||||
|
|
||||||
|
dbcursor.moveToNext();
|
||||||
|
}
|
||||||
|
dbcursor.close();
|
||||||
|
return cd;
|
||||||
|
}
|
||||||
|
} catch (Exception e) {
|
||||||
|
Log.d("Exception ", "get MSL_Availability server upload Data!" + e.toString());
|
||||||
|
return cd;
|
||||||
|
}
|
||||||
|
return cd;
|
||||||
|
}
|
||||||
|
|
||||||
|
//Get Pharma Store MSL Inserted Data
|
||||||
|
public ArrayList<PharmaMSLInsertedGetterSetter> getPharmaMSLInsertedData(String store_id) {
|
||||||
|
ArrayList<PharmaMSLInsertedGetterSetter> list = new ArrayList<>();
|
||||||
|
Cursor dbcursor = null;
|
||||||
|
|
||||||
|
try {
|
||||||
|
|
||||||
|
dbcursor = db.rawQuery("Select * from " + CommonString.TABLE_INSERT_PHARMA_MSL_DATA +
|
||||||
|
" where "+ CommonString.KEY_STORE_ID +"='" + store_id + "'", null);
|
||||||
|
|
||||||
|
if (dbcursor != null) {
|
||||||
|
dbcursor.moveToFirst();
|
||||||
|
while (!dbcursor.isAfterLast()) {
|
||||||
|
PharmaMSLInsertedGetterSetter data = new PharmaMSLInsertedGetterSetter();
|
||||||
|
|
||||||
|
data.setBrandId(dbcursor.getString(dbcursor.getColumnIndexOrThrow(CommonString.KEY_BRAND_ID)));
|
||||||
|
data.setSkuId(dbcursor.getString(dbcursor.getColumnIndexOrThrow(CommonString.KEY_SKU_ID)));
|
||||||
|
data.setPresent(dbcursor.getInt(dbcursor.getColumnIndexOrThrow(CommonString.KEY_PRESENT)));
|
||||||
|
|
||||||
|
list.add(data);
|
||||||
|
dbcursor.moveToNext();
|
||||||
|
}
|
||||||
|
dbcursor.close();
|
||||||
|
return list;
|
||||||
|
}
|
||||||
|
} catch (Exception e) {
|
||||||
|
Log.d("Exception ", "get MSL_Availability server upload Data!" + e.toString());
|
||||||
|
return list;
|
||||||
|
}
|
||||||
|
return list;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -241,7 +241,10 @@ public class GeoTagActivity extends AppCompatActivity implements OnMapReadyCallb
|
|||||||
if (store_flag_str.equalsIgnoreCase(CommonString.FROM_DEVIATION)) {
|
if (store_flag_str.equalsIgnoreCase(CommonString.FROM_DEVIATION)) {
|
||||||
db.updateStatus(storeid, status, latitude, longitude, CommonString.KEY_ADHOC_JOURNEY_PLAN);
|
db.updateStatus(storeid, status, latitude, longitude, CommonString.KEY_ADHOC_JOURNEY_PLAN);
|
||||||
}
|
}
|
||||||
else {
|
else if (store_flag_str.equalsIgnoreCase(CommonString.FROM_ADDITIONAL)) {
|
||||||
|
db.updateStatus(storeid, status, latitude, longitude, CommonString.KEY_JOURNEY_PLAN_ADDITIONAL);
|
||||||
|
}
|
||||||
|
else{
|
||||||
db.updateStatus(storeid, status, latitude, longitude, CommonString.KEY_JOURNEY_PLAN);
|
db.updateStatus(storeid, status, latitude, longitude, CommonString.KEY_JOURNEY_PLAN);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -726,10 +729,13 @@ public class GeoTagActivity extends AppCompatActivity implements OnMapReadyCallb
|
|||||||
db.updateGeoTagData(geotaglist.get(i).storeid, statusD);
|
db.updateGeoTagData(geotaglist.get(i).storeid, statusD);
|
||||||
|
|
||||||
if (store_flag_str.equalsIgnoreCase(CommonString.FROM_DEVIATION)) {
|
if (store_flag_str.equalsIgnoreCase(CommonString.FROM_DEVIATION)) {
|
||||||
db.updateDataStatus(geotaglist.get(i).getStoreid(), statusD, CommonString.KEY_ADHOC_JOURNEY_PLAN);
|
db.updateDataStatus(geotaglist.get(i), statusD, CommonString.KEY_ADHOC_JOURNEY_PLAN);
|
||||||
|
}
|
||||||
|
else if (store_flag_str.equalsIgnoreCase(CommonString.FROM_ADDITIONAL)) {
|
||||||
|
db.updateDataStatus(geotaglist.get(i), statusD, CommonString.KEY_JOURNEY_PLAN_ADDITIONAL);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
db.updateDataStatus(geotaglist.get(i).getStoreid(), statusD, CommonString.KEY_JOURNEY_PLAN);
|
db.updateDataStatus(geotaglist.get(i), statusD, CommonString.KEY_JOURNEY_PLAN);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -990,10 +996,13 @@ public class GeoTagActivity extends AppCompatActivity implements OnMapReadyCallb
|
|||||||
db.updateGeoTagData(geotaglistImage.get(i).getStoreid(), Statustag);
|
db.updateGeoTagData(geotaglistImage.get(i).getStoreid(), Statustag);
|
||||||
|
|
||||||
if (store_flag_str.equalsIgnoreCase(CommonString.FROM_DEVIATION)) {
|
if (store_flag_str.equalsIgnoreCase(CommonString.FROM_DEVIATION)) {
|
||||||
db.updateDataStatus(geotaglistImage.get(i).getStoreid(), Statustag, CommonString.KEY_ADHOC_JOURNEY_PLAN);
|
db.updateDataStatus(geotaglistImage.get(i), Statustag, CommonString.KEY_ADHOC_JOURNEY_PLAN);
|
||||||
}
|
}
|
||||||
else {
|
else if (store_flag_str.equalsIgnoreCase(CommonString.FROM_ADDITIONAL)) {
|
||||||
db.updateDataStatus(geotaglistImage.get(i).getStoreid(), Statustag, CommonString.KEY_JOURNEY_PLAN);
|
db.updateDataStatus(geotaglistImage.get(i), Statustag, CommonString.KEY_JOURNEY_PLAN_ADDITIONAL);
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
db.updateDataStatus(geotaglistImage.get(i), Statustag, CommonString.KEY_JOURNEY_PLAN);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -56,6 +56,7 @@ import com.google.firebase.analytics.FirebaseAnalytics;
|
|||||||
import com.google.firebase.perf.FirebasePerformance;
|
import com.google.firebase.perf.FirebasePerformance;
|
||||||
import com.google.firebase.perf.metrics.Trace;
|
import com.google.firebase.perf.metrics.Trace;
|
||||||
import com.google.gson.Gson;
|
import com.google.gson.Gson;
|
||||||
|
import com.google.gson.reflect.TypeToken;
|
||||||
|
|
||||||
import org.ksoap2.SoapEnvelope;
|
import org.ksoap2.SoapEnvelope;
|
||||||
import org.ksoap2.serialization.SoapObject;
|
import org.ksoap2.serialization.SoapObject;
|
||||||
@@ -68,9 +69,11 @@ import org.xmlpull.v1.XmlPullParserFactory;
|
|||||||
import java.io.File;
|
import java.io.File;
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.io.StringReader;
|
import java.io.StringReader;
|
||||||
|
import java.lang.reflect.Type;
|
||||||
import java.net.MalformedURLException;
|
import java.net.MalformedURLException;
|
||||||
import java.text.ParseException;
|
import java.text.ParseException;
|
||||||
import java.text.SimpleDateFormat;
|
import java.text.SimpleDateFormat;
|
||||||
|
import java.util.ArrayList;
|
||||||
import java.util.Calendar;
|
import java.util.Calendar;
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
@@ -682,10 +685,12 @@ public class LoginActivity extends AppCompatActivity implements GoogleApiClient.
|
|||||||
|
|
||||||
if (result.equals(CommonString.KEY_SUCCESS)) {
|
if (result.equals(CommonString.KEY_SUCCESS)) {
|
||||||
|
|
||||||
// database.open();
|
//set true for South Africa
|
||||||
if (preferences.getString(CommonString.KEY_VERSION, "").equals(
|
boolean forSA = true;
|
||||||
Integer.toString(versionCode))) {
|
|
||||||
|
|
||||||
|
// database.open();
|
||||||
|
if(forSA){
|
||||||
|
//For SA Only
|
||||||
if (preferences.getString(CommonString.KEY_LANGUAGE, "").equals("")) {
|
if (preferences.getString(CommonString.KEY_LANGUAGE, "").equals("")) {
|
||||||
|
|
||||||
Intent intent = new Intent(getBaseContext(),
|
Intent intent = new Intent(getBaseContext(),
|
||||||
@@ -697,57 +702,60 @@ public class LoginActivity extends AppCompatActivity implements GoogleApiClient.
|
|||||||
finish();
|
finish();
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
|
setLanguageDataFromSharedPreferences();
|
||||||
|
|
||||||
CommonFunctions.updateLangResources(getApplicationContext(), preferences.getString(CommonString.KEY_LANGUAGE, ""));
|
CommonFunctions.updateLangResources(getApplicationContext(), preferences.getString(CommonString.KEY_LANGUAGE, ""));
|
||||||
|
|
||||||
/*Intent intent = new Intent(getBaseContext(),
|
|
||||||
MainActivity.class);
|
|
||||||
startActivity(intent);
|
|
||||||
|
|
||||||
finish();*/
|
|
||||||
|
|
||||||
Intent in = new Intent(getApplicationContext(), MPinActivity.class);
|
Intent in = new Intent(getApplicationContext(), MPinActivity.class);
|
||||||
in.putExtra(CommonString.IS_PASSWORD_CHECK, false);
|
in.putExtra(CommonString.IS_PASSWORD_CHECK, false);
|
||||||
startActivity(in);
|
startActivity(in);
|
||||||
finish();
|
finish();
|
||||||
|
|
||||||
|
|
||||||
//uploadPreviousImages();
|
//uploadPreviousImages();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
//for other than SA
|
||||||
|
if (preferences.getString(CommonString.KEY_VERSION, "").equals(
|
||||||
|
Integer.toString(versionCode))) {
|
||||||
|
|
||||||
|
if (preferences.getString(CommonString.KEY_LANGUAGE, "").equals("")) {
|
||||||
|
|
||||||
|
Intent intent = new Intent(getBaseContext(),
|
||||||
|
SelectLanguageActivity.class);
|
||||||
|
|
||||||
|
intent.putExtra(CommonString.KEY_LOGIN_DATA, lgs);
|
||||||
|
startActivity(intent);
|
||||||
|
|
||||||
|
finish();
|
||||||
|
} else {
|
||||||
|
|
||||||
|
setLanguageDataFromSharedPreferences();
|
||||||
|
|
||||||
|
Intent in = new Intent(getApplicationContext(), MPinActivity.class);
|
||||||
|
in.putExtra(CommonString.IS_PASSWORD_CHECK, false);
|
||||||
|
startActivity(in);
|
||||||
|
finish();
|
||||||
|
|
||||||
|
//uploadPreviousImages();
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
Intent intent = new Intent(getBaseContext(),
|
Intent intent = new Intent(getBaseContext(),
|
||||||
AutoUpdateActivity.class);
|
AutoUpdateActivity.class);
|
||||||
|
|
||||||
intent.putExtra(CommonString.KEY_PATH,
|
intent.putExtra(CommonString.KEY_PATH,
|
||||||
preferences.getString(CommonString.KEY_PATH, ""));
|
preferences.getString(CommonString.KEY_PATH, ""));
|
||||||
startActivity(intent);
|
startActivity(intent);
|
||||||
finish();
|
finish();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//For SA Only
|
|
||||||
/*if (preferences.getString(CommonString.KEY_LANGUAGE, "").equals("")) {
|
|
||||||
|
|
||||||
Intent intent = new Intent(getBaseContext(),
|
|
||||||
SelectLanguageActivity.class);
|
|
||||||
|
|
||||||
intent.putExtra(CommonString.KEY_LOGIN_DATA, lgs);
|
|
||||||
startActivity(intent);
|
|
||||||
|
|
||||||
finish();
|
|
||||||
} else {
|
|
||||||
|
|
||||||
CommonFunctions.updateLangResources(getApplicationContext(), preferences.getString(CommonString.KEY_LANGUAGE, ""));
|
|
||||||
|
|
||||||
Intent intent = new Intent(getBaseContext(),
|
|
||||||
MainActivity.class);
|
|
||||||
startActivity(intent);
|
|
||||||
|
|
||||||
finish();
|
|
||||||
|
|
||||||
//uploadPreviousImages();
|
|
||||||
}*/
|
|
||||||
}
|
}
|
||||||
dialog.dismiss();
|
dialog.dismiss();
|
||||||
}
|
}
|
||||||
@@ -943,12 +951,12 @@ public class LoginActivity extends AppCompatActivity implements GoogleApiClient.
|
|||||||
file_planogram.mkdir();
|
file_planogram.mkdir();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (Build.VERSION.SDK_INT >= 23 && ContextCompat.checkSelfPermission(getApplicationContext(),
|
/* if (Build.VERSION.SDK_INT >= 23 && ContextCompat.checkSelfPermission(getApplicationContext(),
|
||||||
android.Manifest.permission.ACCESS_FINE_LOCATION) != PackageManager.PERMISSION_GRANTED &&
|
android.Manifest.permission.ACCESS_FINE_LOCATION) != PackageManager.PERMISSION_GRANTED &&
|
||||||
ContextCompat.checkSelfPermission(getApplicationContext(),
|
ContextCompat.checkSelfPermission(getApplicationContext(),
|
||||||
android.Manifest.permission.ACCESS_COARSE_LOCATION) != PackageManager.PERMISSION_GRANTED) {
|
android.Manifest.permission.ACCESS_COARSE_LOCATION) != PackageManager.PERMISSION_GRANTED) {
|
||||||
return;
|
return;
|
||||||
}
|
}*/
|
||||||
|
|
||||||
if (checkPlayServices()) {
|
if (checkPlayServices()) {
|
||||||
// Building the GoogleApi client
|
// Building the GoogleApi client
|
||||||
@@ -1022,12 +1030,12 @@ public class LoginActivity extends AppCompatActivity implements GoogleApiClient.
|
|||||||
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
if (Build.VERSION.SDK_INT >= 23 && ContextCompat.checkSelfPermission(getApplicationContext(),
|
/* if (Build.VERSION.SDK_INT >= 23 && ContextCompat.checkSelfPermission(getApplicationContext(),
|
||||||
android.Manifest.permission.ACCESS_FINE_LOCATION) != PackageManager.PERMISSION_GRANTED &&
|
android.Manifest.permission.ACCESS_FINE_LOCATION) != PackageManager.PERMISSION_GRANTED &&
|
||||||
ContextCompat.checkSelfPermission(getApplicationContext(),
|
ContextCompat.checkSelfPermission(getApplicationContext(),
|
||||||
android.Manifest.permission.ACCESS_COARSE_LOCATION) != PackageManager.PERMISSION_GRANTED) {
|
android.Manifest.permission.ACCESS_COARSE_LOCATION) != PackageManager.PERMISSION_GRANTED) {
|
||||||
return;
|
return;
|
||||||
}
|
}*/
|
||||||
|
|
||||||
if (checkPlayServices()) {
|
if (checkPlayServices()) {
|
||||||
// Building the GoogleApi client
|
// Building the GoogleApi client
|
||||||
@@ -1216,5 +1224,39 @@ public class LoginActivity extends AppCompatActivity implements GoogleApiClient.
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
ArrayList<String> language, culture_id, notice_url;
|
||||||
|
|
||||||
|
LoginGetterSetter login_data;
|
||||||
|
|
||||||
|
private void setLanguageDataFromSharedPreferences(){
|
||||||
|
Gson gson = new Gson();
|
||||||
|
login_data = new LoginGetterSetter();
|
||||||
|
|
||||||
|
String jsonPreferences = preferences.getString(CommonString.KEY_LOOGIN_PREF, "");
|
||||||
|
|
||||||
|
Type type = new TypeToken<LoginGetterSetter>() {}.getType();
|
||||||
|
login_data = gson.fromJson(jsonPreferences, type);
|
||||||
|
|
||||||
|
language = login_data.getCULTURE_NAME();
|
||||||
|
culture_id = login_data.getCULTURE_ID();
|
||||||
|
notice_url = login_data.getNOTICE_URL();
|
||||||
|
|
||||||
|
String lang = preferences.getString(CommonString.KEY_LANGUAGE, "");
|
||||||
|
|
||||||
|
if(language.size()>0){
|
||||||
|
for(int i=0; i<language.size();i++){
|
||||||
|
if(lang.equals(language.get(i))){
|
||||||
|
editor.putString(CommonString.KEY_LANGUAGE, language.get(i));
|
||||||
|
editor.putString(CommonString.KEY_CULTURE_ID, culture_id.get(i));
|
||||||
|
editor.putString(CommonString.KEY_NOTICE_BOARD_LINK, notice_url.get(i));
|
||||||
|
editor.commit();
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
//return ;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -50,6 +50,8 @@ import cpm.com.gskmtorange.dailyentry.SettingsActivity;
|
|||||||
import cpm.com.gskmtorange.dailyentry.StoreListActivity;
|
import cpm.com.gskmtorange.dailyentry.StoreListActivity;
|
||||||
import cpm.com.gskmtorange.download.DownloadActivity;
|
import cpm.com.gskmtorange.download.DownloadActivity;
|
||||||
import cpm.com.gskmtorange.password.ChangePasswordActivity;
|
import cpm.com.gskmtorange.password.ChangePasswordActivity;
|
||||||
|
import cpm.com.gskmtorange.pharma_stores.PharmaActivity;
|
||||||
|
import cpm.com.gskmtorange.pharma_stores.PharmaActivityFragment;
|
||||||
import cpm.com.gskmtorange.upload.PreviousDataUploadActivity;
|
import cpm.com.gskmtorange.upload.PreviousDataUploadActivity;
|
||||||
import cpm.com.gskmtorange.upload.UploadActivity;
|
import cpm.com.gskmtorange.upload.UploadActivity;
|
||||||
import cpm.com.gskmtorange.xmlGetterSetter.ConfigurationMasterGetterSetter;
|
import cpm.com.gskmtorange.xmlGetterSetter.ConfigurationMasterGetterSetter;
|
||||||
@@ -197,9 +199,8 @@ public class MainActivity extends AppCompatActivity
|
|||||||
}
|
}
|
||||||
|
|
||||||
//temp remove it
|
//temp remove it
|
||||||
/* Menu nav_Menu1 = navigationView.getMenu();
|
/*Menu nav_Menu1 = navigationView.getMenu();
|
||||||
nav_Menu1.findItem(R.id.nav_deviation).setVisible(true);*/
|
nav_Menu1.findItem(R.id.nav_deviation).setVisible(true);*/
|
||||||
|
|
||||||
if (configurationData.get(i).getCONFIGURE().get(0).equalsIgnoreCase("PDF ALLOW") &&
|
if (configurationData.get(i).getCONFIGURE().get(0).equalsIgnoreCase("PDF ALLOW") &&
|
||||||
configurationData.get(i).getACTIVE().get(0).equalsIgnoreCase("1")) {
|
configurationData.get(i).getACTIVE().get(0).equalsIgnoreCase("1")) {
|
||||||
Menu nav_Menu = navigationView.getMenu();
|
Menu nav_Menu = navigationView.getMenu();
|
||||||
@@ -211,6 +212,19 @@ public class MainActivity extends AppCompatActivity
|
|||||||
Menu nav_Menu = navigationView.getMenu();
|
Menu nav_Menu = navigationView.getMenu();
|
||||||
nav_Menu.findItem(R.id.nav_delivery_call).setVisible(true);
|
nav_Menu.findItem(R.id.nav_delivery_call).setVisible(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (configurationData.get(i).getCONFIGURE().get(0).equalsIgnoreCase("ADDITIONAL STORE") &&
|
||||||
|
configurationData.get(i).getACTIVE().get(0).equalsIgnoreCase("1")) {
|
||||||
|
Menu nav_Menu = navigationView.getMenu();
|
||||||
|
nav_Menu.findItem(R.id.nav_additional_stores).setVisible(true);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (configurationData.get(i).getCONFIGURE().get(0).equalsIgnoreCase("PHARMA STORE") &&
|
||||||
|
configurationData.get(i).getACTIVE().get(0).equalsIgnoreCase("1")) {
|
||||||
|
Menu nav_Menu = navigationView.getMenu();
|
||||||
|
nav_Menu.findItem(R.id.nav_pharmacy_stores).setVisible(true);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -442,6 +456,34 @@ public class MainActivity extends AppCompatActivity
|
|||||||
startActivity(in);
|
startActivity(in);
|
||||||
|
|
||||||
overridePendingTransition(R.anim.activity_in, R.anim.activity_out);
|
overridePendingTransition(R.anim.activity_in, R.anim.activity_out);
|
||||||
|
} else if (id == R.id.nav_pharmacy_stores) {
|
||||||
|
/*Intent in = new Intent(this, PharmaActivity.class);
|
||||||
|
startActivity(in);*/
|
||||||
|
|
||||||
|
Intent in = new Intent(this, StoreListActivity.class);
|
||||||
|
in.putExtra(CommonString.KEY_STORE_FLAG, CommonString.FROM_PHARMA);
|
||||||
|
|
||||||
|
startActivity(in);
|
||||||
|
|
||||||
|
overridePendingTransition(R.anim.activity_in, R.anim.activity_out);
|
||||||
|
} else if (id == R.id.nav_additional_stores) {
|
||||||
|
db.open();
|
||||||
|
|
||||||
|
if (db.getSKUMasterData(null).size() == 0) {
|
||||||
|
|
||||||
|
Snackbar.make(webView, R.string.title_store_list_download_data, Snackbar.LENGTH_SHORT)
|
||||||
|
.setAction("Action", null).show();
|
||||||
|
|
||||||
|
// Toast.makeText(getBaseContext(), "Please Download Data First", Toast.LENGTH_LONG).show();
|
||||||
|
} else {
|
||||||
|
|
||||||
|
Intent in = new Intent(this, StoreListActivity.class);
|
||||||
|
in.putExtra(CommonString.KEY_STORE_FLAG, CommonString.FROM_ADDITIONAL);
|
||||||
|
|
||||||
|
startActivity(in);
|
||||||
|
|
||||||
|
overridePendingTransition(R.anim.activity_in, R.anim.activity_out);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
DrawerLayout drawer = (DrawerLayout) findViewById(R.id.drawer_layout);
|
DrawerLayout drawer = (DrawerLayout) findViewById(R.id.drawer_layout);
|
||||||
@@ -503,7 +545,7 @@ public class MainActivity extends AppCompatActivity
|
|||||||
|
|
||||||
public boolean isValid() {
|
public boolean isValid() {
|
||||||
boolean flag = false;
|
boolean flag = false;
|
||||||
String storestatus;
|
String storestatus="";
|
||||||
for (int i = 0; i < coverageList.size(); i++) {
|
for (int i = 0; i < coverageList.size(); i++) {
|
||||||
|
|
||||||
StoreBean store_data = db.getSpecificStoreData(date, coverageList.get(i).getStoreId(), coverageList.get(i).getFlag_from());
|
StoreBean store_data = db.getSpecificStoreData(date, coverageList.get(i).getStoreId(), coverageList.get(i).getFlag_from());
|
||||||
|
|||||||
@@ -0,0 +1,13 @@
|
|||||||
|
package cpm.com.gskmtorange.comparators;
|
||||||
|
|
||||||
|
import java.util.Comparator;
|
||||||
|
|
||||||
|
import cpm.com.gskmtorange.GetterSetter.StoreBean;
|
||||||
|
|
||||||
|
public class StatusCompare implements Comparator<StoreBean> {
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int compare(StoreBean o1, StoreBean o2) {
|
||||||
|
return o1.getUPLOAD_STATUS().compareTo(o2.getUPLOAD_STATUS());
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -57,6 +57,8 @@ public class CommonString {
|
|||||||
public static final String KEY_IMAGE = "IMAGE";
|
public static final String KEY_IMAGE = "IMAGE";
|
||||||
public static final String KEY_IMAGE1 = "IMAGE1";
|
public static final String KEY_IMAGE1 = "IMAGE1";
|
||||||
public static final String KEY_IMAGE2 = "IMAGE2";
|
public static final String KEY_IMAGE2 = "IMAGE2";
|
||||||
|
public static final String KEY_IMAGE3 = "IMAGE3";
|
||||||
|
public static final String KEY_IMAGE4 = "IMAGE4";
|
||||||
public static final String KEY_IMAGE_URL = "IMAGE_URL";
|
public static final String KEY_IMAGE_URL = "IMAGE_URL";
|
||||||
public static final String KEY_IMAGE_PATH = "IMAGE_PATH";
|
public static final String KEY_IMAGE_PATH = "IMAGE_PATH";
|
||||||
public static final String KEY_ID = "Id";
|
public static final String KEY_ID = "Id";
|
||||||
@@ -95,9 +97,13 @@ public class CommonString {
|
|||||||
|
|
||||||
public static final String KEY_JOURNEY_PLAN = "JOURNEY_PLAN";
|
public static final String KEY_JOURNEY_PLAN = "JOURNEY_PLAN";
|
||||||
public static final String KEY_ADHOC_JOURNEY_PLAN = "ADHOC_JOURNEYPLAN";
|
public static final String KEY_ADHOC_JOURNEY_PLAN = "ADHOC_JOURNEYPLAN";
|
||||||
|
public static final String KEY_JOURNEY_PLAN_ADDITIONAL = "JOURNEY_PLAN_ADDITIONAL";
|
||||||
|
public static final String KEY_JOURNEY_PLAN_PHARMA = "JOURNEY_PLAN_PHARMA";
|
||||||
public static final String KEY_STORE_FLAG = "STORE_FLAG";
|
public static final String KEY_STORE_FLAG = "STORE_FLAG";
|
||||||
public static final String FROM_DEVIATION = "DEVIATION";
|
public static final String FROM_DEVIATION = "DEVIATION";
|
||||||
public static final String FROM_JCP = "JCP";
|
public static final String FROM_JCP = "JCP";
|
||||||
|
public static final String FROM_ADDITIONAL = "ADDITIONAL";
|
||||||
|
public static final String FROM_PHARMA = "PHARMA";
|
||||||
public static final String TABLE_INSERT_STOCK_DIALOG = "STOCK_DIALOG";
|
public static final String TABLE_INSERT_STOCK_DIALOG = "STOCK_DIALOG";
|
||||||
|
|
||||||
|
|
||||||
@@ -130,10 +136,16 @@ public class CommonString {
|
|||||||
|
|
||||||
public static final String KEY_NO_DATA = "NODATA";
|
public static final String KEY_NO_DATA = "NODATA";
|
||||||
|
|
||||||
|
public static final int COUNTRY_ID_EGYPT = 6;
|
||||||
|
|
||||||
public static final int UNIT_VERTICAL = 50;
|
public static final int UNIT_VERTICAL = 50;
|
||||||
public static final int UNIT_HORIZONTAL = 200;
|
public static final int UNIT_HORIZONTAL = 200;
|
||||||
|
|
||||||
public static String URL = "http://gskme.parinaam.in/Gskwebservice.asmx";
|
public static String URL = "http://gskme.parinaam.in/Gskwebservice.asmx";
|
||||||
|
|
||||||
|
//temp remove
|
||||||
|
//public static String URL = "http://gskmetest.parinaam.in/gskwebservice.asmx";
|
||||||
|
|
||||||
public static final String NAMESPACE = "http://tempuri.org/";
|
public static final String NAMESPACE = "http://tempuri.org/";
|
||||||
public static final String METHOD_LOGIN = "UserLoginDetail";
|
public static final String METHOD_LOGIN = "UserLoginDetail";
|
||||||
public static final String SOAP_ACTION_LOGIN = "http://tempuri.org/"
|
public static final String SOAP_ACTION_LOGIN = "http://tempuri.org/"
|
||||||
@@ -145,6 +157,8 @@ public class CommonString {
|
|||||||
public static final String METHOD_UPLOAD_STOCK_XML_DATA = "DrUploadXml";
|
public static final String METHOD_UPLOAD_STOCK_XML_DATA = "DrUploadXml";
|
||||||
|
|
||||||
public static final String METHOD_UPLOAD_CURRENT_DATA = "CurrentLocation";
|
public static final String METHOD_UPLOAD_CURRENT_DATA = "CurrentLocation";
|
||||||
|
public static final String METHOD_UPLOAD_CURRENT_DATA_ADDITIONAL = "CurrentLocation_Additional";
|
||||||
|
public static final String METHOD_UPLOAD_CURRENT_DATA_PHARMA = "CurrentLocation_Pharma";
|
||||||
|
|
||||||
public static final String SOAP_ACTION_UPLOAD_CURRRENT_DATA = "http://tempuri.org/"
|
public static final String SOAP_ACTION_UPLOAD_CURRRENT_DATA = "http://tempuri.org/"
|
||||||
+ METHOD_UPLOAD_CURRENT_DATA;
|
+ METHOD_UPLOAD_CURRENT_DATA;
|
||||||
@@ -169,8 +183,15 @@ public class CommonString {
|
|||||||
//public static final String METHOD_UPLOAD_COVERAGE = "UPLOAD_COVERAGENEW";
|
//public static final String METHOD_UPLOAD_COVERAGE = "UPLOAD_COVERAGENEW";
|
||||||
public static final String METHOD_UPLOAD_COVERAGE = "UPLOAD_COVERAGENEW1";
|
public static final String METHOD_UPLOAD_COVERAGE = "UPLOAD_COVERAGENEW1";
|
||||||
public static final String METHOD_UPLOAD_COVERAGE_NEW = "UPLOAD_COVERAGENEW2";
|
public static final String METHOD_UPLOAD_COVERAGE_NEW = "UPLOAD_COVERAGENEW2";
|
||||||
|
public static final String METHOD_UPLOAD_COVERAGE_NEW_ADDITIONAL = "UPLOAD_COVERAGENEW2_Additional";
|
||||||
|
public static final String METHOD_UPLOAD_COVERAGE_NEW_PHARMA = "UPLOAD_COVERAGENEW2_Pharma";
|
||||||
|
public static final String METHOD_UPLOAD_CHECKOUT_STATUS = "Upload_Store_ChecOut_Status";
|
||||||
|
public static final String METHOD_UPLOAD_CHECKOUT_STATUS_ADDITIONAL = "Upload_Store_ChecOut_Status_Additional";
|
||||||
|
public static final String METHOD_UPLOAD_CHECKOUT_STATUS_PHARMA = "Upload_Store_ChecOut_Status_Pharma";
|
||||||
|
|
||||||
public static final String METHOD_UPLOAD_COVERAGE_STATUS = "UploadCoverage_Status";
|
public static final String METHOD_UPLOAD_COVERAGE_STATUS = "UploadCoverage_Status";
|
||||||
|
public static final String METHOD_UPLOAD_COVERAGE_STATUS_ADDITIONAL = "UploadCoverage_Status_Additional";
|
||||||
|
public static final String METHOD_UPLOAD_COVERAGE_STATUS_PHARMA = "UploadCoverage_Status_Pharma";
|
||||||
|
|
||||||
public static final String SOAP_ACTION = "http://tempuri.org/";
|
public static final String SOAP_ACTION = "http://tempuri.org/";
|
||||||
|
|
||||||
@@ -1052,6 +1073,7 @@ public class CommonString {
|
|||||||
public static String TABLE_MAPPING_STOCK_ADHOC = "MAPPING_STOCK_ADHOC";
|
public static String TABLE_MAPPING_STOCK_ADHOC = "MAPPING_STOCK_ADHOC";
|
||||||
public static String TABLE_MAPPING_STOCK = "MAPPING_STOCK";
|
public static String TABLE_MAPPING_STOCK = "MAPPING_STOCK";
|
||||||
public static String TABLE_MAPPING_STOCK_STOREWISE = "MAPPING_STOCK_STOREWISE";
|
public static String TABLE_MAPPING_STOCK_STOREWISE = "MAPPING_STOCK_STOREWISE";
|
||||||
|
public static String TABLE_MAPPING_STOCK_ADDITIONAL = "MAPPING_STOCK_ADDITIONAL";
|
||||||
public static String TABLE_MAPPING_T2P_ADHOC = "MAPPING_T2P_ADHOC";
|
public static String TABLE_MAPPING_T2P_ADHOC = "MAPPING_T2P_ADHOC";
|
||||||
public static String TABLE_MAPPING_PROMOTION_ADHOC = "MAPPING_PROMOTION_ADHOC";
|
public static String TABLE_MAPPING_PROMOTION_ADHOC = "MAPPING_PROMOTION_ADHOC";
|
||||||
public static String TABLE_MAPPING_ADDITIONAL_PROMOTION_ADHOC = "MAPPING_ADDITIONAL_PROMOTION_ADHOC";
|
public static String TABLE_MAPPING_ADDITIONAL_PROMOTION_ADHOC = "MAPPING_ADDITIONAL_PROMOTION_ADHOC";
|
||||||
@@ -1140,4 +1162,104 @@ public class CommonString {
|
|||||||
+ " VARCHAR"
|
+ " VARCHAR"
|
||||||
|
|
||||||
+ ")";
|
+ ")";
|
||||||
|
|
||||||
|
public static final String TABLE_INSERT_STOCK = "Stock_Data";
|
||||||
|
|
||||||
|
public static final String CREATE_TABLE_INSERT_STOCK = "CREATE TABLE IF NOT EXISTS "
|
||||||
|
+ TABLE_INSERT_STOCK
|
||||||
|
+ "("
|
||||||
|
+ "KEY_ID"
|
||||||
|
+ " INTEGER PRIMARY KEY AUTOINCREMENT ,"
|
||||||
|
|
||||||
|
+ "Store_Id"
|
||||||
|
+ " INTEGER,"
|
||||||
|
|
||||||
|
+ "Category_Id"
|
||||||
|
+ " INTEGER,"
|
||||||
|
|
||||||
|
+ "Brand_Id"
|
||||||
|
+ " VARCHAR,"
|
||||||
|
|
||||||
|
+ "SKU_ID"
|
||||||
|
+ " INTEGER,"
|
||||||
|
|
||||||
|
+ "SKU"
|
||||||
|
+ " VARCHAR,"
|
||||||
|
|
||||||
|
+ "SKU_SEQUENCE"
|
||||||
|
+ " VARCHAR,"
|
||||||
|
|
||||||
|
+ "MBQ"
|
||||||
|
+ " VARCHAR,"
|
||||||
|
|
||||||
|
+ "COMPANY_ID"
|
||||||
|
+ " INTEGER,"
|
||||||
|
|
||||||
|
+ "STOCK"
|
||||||
|
+ " INTEGER,"
|
||||||
|
|
||||||
|
+ "TOGGLE_VALUE"
|
||||||
|
+ " VARCHAR,"
|
||||||
|
|
||||||
|
+ "MUST_HAVE"
|
||||||
|
+ " VARCHAR"
|
||||||
|
|
||||||
|
+ ")";
|
||||||
|
|
||||||
|
public static final String TABLE_INSERT_STORE_PROFILE_DATA = "Store_Profile_Data";
|
||||||
|
public static final String TABLE_INSERT_PHARMA_IMAGE_DATA = "PHARMA_IMAGE_DATA";
|
||||||
|
public static final String KEY_QUESTION_ID = "QUESTION_ID";
|
||||||
|
public static final String KEY_QUESTION = "QUESTION";
|
||||||
|
|
||||||
|
public static final String CREATE_TABLE_INSERT_STORE_PROFILE_DATA = "CREATE TABLE IF NOT EXISTS " + TABLE_INSERT_STORE_PROFILE_DATA
|
||||||
|
+ " ("
|
||||||
|
+ KEY_ID + " INTEGER PRIMARY KEY AUTOINCREMENT ,"
|
||||||
|
+ KEY_STORE_ID + " INTEGER, "
|
||||||
|
+ KEY_QUESTION_ID + " INTEGER,"
|
||||||
|
+ KEY_QUESTION + " VARCHAR,"
|
||||||
|
+ KEY_SUB_CATEGORY_ID + " INTEGER,"
|
||||||
|
+ KEY_SUB_CATEGORY + " VARCHAR,"
|
||||||
|
+ KEY_BRAND_ID + " INTEGER,"
|
||||||
|
+ KEY_BRAND + " VARCHAR,"
|
||||||
|
+ KEY_IMAGE + " VARCHAR,"
|
||||||
|
+ KEY_PRESENT + " INTEGER)";
|
||||||
|
|
||||||
|
|
||||||
|
public static final String CREATE_TABLE_INSERT_PHARMA_IMAGE_DATA = "CREATE TABLE IF NOT EXISTS " + TABLE_INSERT_PHARMA_IMAGE_DATA
|
||||||
|
+ " ("
|
||||||
|
+ KEY_ID + " INTEGER PRIMARY KEY AUTOINCREMENT ,"
|
||||||
|
+ KEY_STORE_ID + " INTEGER, "
|
||||||
|
+ KEY_IMAGE1 + " VARCHAR,"
|
||||||
|
+ KEY_IMAGE2 + " VARCHAR,"
|
||||||
|
+ KEY_IMAGE3 + " VARCHAR,"
|
||||||
|
+ KEY_IMAGE4 + " INTEGER)";
|
||||||
|
|
||||||
|
public static final String TABLE_INSERT_SOS_PHARMA_DATA = "SOS_PHARMA_DATA";
|
||||||
|
public static final String KEY_GSK_FACING= "GSK_FACING";
|
||||||
|
public static final String KEY_COMPETITION_FACING = "COMPETITION_FACING";
|
||||||
|
|
||||||
|
public static final String CREATE_TABLE_INSERT_SOS_PHARMA_DATA = "CREATE TABLE IF NOT EXISTS " + TABLE_INSERT_SOS_PHARMA_DATA
|
||||||
|
+ " ("
|
||||||
|
+ KEY_ID + " INTEGER PRIMARY KEY AUTOINCREMENT ,"
|
||||||
|
+ KEY_STORE_ID + " INTEGER, "
|
||||||
|
+ KEY_QUESTION_ID + " INTEGER,"
|
||||||
|
+ KEY_QUESTION + " VARCHAR,"
|
||||||
|
+ KEY_SUB_CATEGORY_ID + " INTEGER,"
|
||||||
|
+ KEY_SUB_CATEGORY + " VARCHAR,"
|
||||||
|
+ KEY_BRAND_ID + " INTEGER,"
|
||||||
|
+ KEY_BRAND + " VARCHAR,"
|
||||||
|
+ KEY_GSK_FACING + " INTEGER,"
|
||||||
|
+ KEY_COMPETITION_FACING + " INTEGER)";
|
||||||
|
|
||||||
|
public static final String TABLE_INSERT_PHARMA_MSL_DATA = "PHARMA_MSL_DATA";
|
||||||
|
|
||||||
|
public static final String CREATE_TABLE_INSERT_PHARMA_MSL_DATA = "CREATE TABLE IF NOT EXISTS " + TABLE_INSERT_PHARMA_MSL_DATA
|
||||||
|
+ " ("
|
||||||
|
+ KEY_ID + " INTEGER PRIMARY KEY AUTOINCREMENT ,"
|
||||||
|
+ KEY_STORE_ID + " INTEGER, "
|
||||||
|
+ KEY_BRAND_ID + " INTEGER,"
|
||||||
|
+ KEY_SKU_ID + " INTEGER,"
|
||||||
|
+ KEY_SKU + " VARCHAR,"
|
||||||
|
+ KEY_IMAGE + " VARCHAR,"
|
||||||
|
+ KEY_PRESENT + " INTEGER)";
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -143,7 +143,19 @@ public class CheckoutActivity extends AppCompatActivity {
|
|||||||
|
|
||||||
final String sos_xml = "[DATA]" + onXML + "[/DATA]";
|
final String sos_xml = "[DATA]" + onXML + "[/DATA]";
|
||||||
|
|
||||||
SoapObject request = new SoapObject(CommonString.NAMESPACE, "Upload_Store_ChecOut_Status");
|
String service;
|
||||||
|
|
||||||
|
if(store_flag_str.equals(CommonString.FROM_ADDITIONAL)){
|
||||||
|
service = CommonString.METHOD_UPLOAD_CHECKOUT_STATUS_ADDITIONAL;
|
||||||
|
}
|
||||||
|
else if(store_flag_str.equals(CommonString.FROM_PHARMA)){
|
||||||
|
service = CommonString.METHOD_UPLOAD_CHECKOUT_STATUS_PHARMA;
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
service = CommonString.METHOD_UPLOAD_CHECKOUT_STATUS;
|
||||||
|
}
|
||||||
|
|
||||||
|
SoapObject request = new SoapObject(CommonString.NAMESPACE, service);
|
||||||
request.addProperty("onXML", sos_xml);
|
request.addProperty("onXML", sos_xml);
|
||||||
/*request.addProperty("KEYS", "CHECKOUT_STATUS");
|
/*request.addProperty("KEYS", "CHECKOUT_STATUS");
|
||||||
request.addProperty("USERNAME", username);*/
|
request.addProperty("USERNAME", username);*/
|
||||||
@@ -154,18 +166,18 @@ public class CheckoutActivity extends AppCompatActivity {
|
|||||||
envelope.setOutputSoapObject(request);
|
envelope.setOutputSoapObject(request);
|
||||||
|
|
||||||
HttpTransportSE androidHttpTransport = new HttpTransportSE(CommonString.URL);
|
HttpTransportSE androidHttpTransport = new HttpTransportSE(CommonString.URL);
|
||||||
androidHttpTransport.call(CommonString.SOAP_ACTION + "Upload_Store_ChecOut_Status", envelope);
|
androidHttpTransport.call(CommonString.SOAP_ACTION + service, envelope);
|
||||||
|
|
||||||
Object result = (Object) envelope.getResponse();
|
Object result = (Object) envelope.getResponse();
|
||||||
|
|
||||||
if (!result.toString().equalsIgnoreCase(CommonString.KEY_SUCCESS)) {
|
if (!result.toString().equalsIgnoreCase(CommonString.KEY_SUCCESS)) {
|
||||||
return "Upload_Store_ChecOut_Status";
|
return service;
|
||||||
}
|
}
|
||||||
if (result.toString().equalsIgnoreCase(CommonString.KEY_NO_DATA)) {
|
if (result.toString().equalsIgnoreCase(CommonString.KEY_NO_DATA)) {
|
||||||
return "Upload_Store_ChecOut_Status";
|
return service;
|
||||||
}
|
}
|
||||||
if (result.toString().equalsIgnoreCase(CommonString.KEY_FAILURE)) {
|
if (result.toString().equalsIgnoreCase(CommonString.KEY_FAILURE)) {
|
||||||
return "Upload_Store_ChecOut_Status";
|
return service;
|
||||||
}
|
}
|
||||||
|
|
||||||
data.value = 100;
|
data.value = 100;
|
||||||
@@ -192,10 +204,15 @@ public class CheckoutActivity extends AppCompatActivity {
|
|||||||
editor.commit();
|
editor.commit();
|
||||||
|
|
||||||
String table;
|
String table;
|
||||||
if(store_flag_str.equals(CommonString.FROM_JCP)){
|
if(store_flag_str.equals(CommonString.FROM_JCP) ){
|
||||||
table = CommonString.KEY_JOURNEY_PLAN;
|
table = CommonString.KEY_JOURNEY_PLAN;
|
||||||
}
|
}
|
||||||
else {
|
else if(store_flag_str.equals(CommonString.FROM_ADDITIONAL)){
|
||||||
|
table = CommonString.KEY_JOURNEY_PLAN_ADDITIONAL;
|
||||||
|
}else if(store_flag_str.equals(CommonString.FROM_PHARMA)){
|
||||||
|
table = CommonString.KEY_JOURNEY_PLAN_PHARMA;
|
||||||
|
}
|
||||||
|
else{
|
||||||
table = CommonString.KEY_ADHOC_JOURNEY_PLAN;
|
table = CommonString.KEY_ADHOC_JOURNEY_PLAN;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -203,7 +220,7 @@ public class CheckoutActivity extends AppCompatActivity {
|
|||||||
|
|
||||||
} else {
|
} else {
|
||||||
if (result.toString().equalsIgnoreCase(CommonString.KEY_FALSE)) {
|
if (result.toString().equalsIgnoreCase(CommonString.KEY_FALSE)) {
|
||||||
return "Upload_Store_ChecOut_Status";
|
return service;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return CommonString.KEY_SUCCESS;
|
return CommonString.KEY_SUCCESS;
|
||||||
@@ -270,7 +287,7 @@ public class CheckoutActivity extends AppCompatActivity {
|
|||||||
|
|
||||||
showAlert(getString(R.string.checkout_successful));
|
showAlert(getString(R.string.checkout_successful));
|
||||||
|
|
||||||
finish();
|
//finish();
|
||||||
|
|
||||||
} else if (!result.equals("")) {
|
} else if (!result.equals("")) {
|
||||||
/*AlertMessage message = new AlertMessage(
|
/*AlertMessage message = new AlertMessage(
|
||||||
|
|||||||
@@ -75,7 +75,7 @@ public class NoCameraActivity extends AppCompatActivity implements Listener {
|
|||||||
RecyclerView rvTop;
|
RecyclerView rvTop;
|
||||||
MSL_AvailabilityStockFacingGetterSetter sub_category_data;
|
MSL_AvailabilityStockFacingGetterSetter sub_category_data;
|
||||||
|
|
||||||
FloatingActionButton fab;
|
FloatingActionButton fab, fab_add;
|
||||||
|
|
||||||
ScrollView scroll_no_camera;
|
ScrollView scroll_no_camera;
|
||||||
|
|
||||||
@@ -93,6 +93,7 @@ public class NoCameraActivity extends AppCompatActivity implements Listener {
|
|||||||
getSupportActionBar().setDisplayHomeAsUpEnabled(true);
|
getSupportActionBar().setDisplayHomeAsUpEnabled(true);
|
||||||
|
|
||||||
fab = (FloatingActionButton) findViewById(R.id.fab);
|
fab = (FloatingActionButton) findViewById(R.id.fab);
|
||||||
|
fab_add = (FloatingActionButton) findViewById(R.id.fab_add);
|
||||||
|
|
||||||
rvTop = (RecyclerView) findViewById(R.id.rvTop);
|
rvTop = (RecyclerView) findViewById(R.id.rvTop);
|
||||||
linear_bottom_parent = (LinearLayout) findViewById(R.id.lin_bottom_parent);
|
linear_bottom_parent = (LinearLayout) findViewById(R.id.lin_bottom_parent);
|
||||||
@@ -222,6 +223,16 @@ public class NoCameraActivity extends AppCompatActivity implements Listener {
|
|||||||
rec_bottom.scrollToPosition(sku_group_master.size() - 1);
|
rec_bottom.scrollToPosition(sku_group_master.size() - 1);
|
||||||
|
|
||||||
tv.setOnDragListener(adapter.getDragInstance());
|
tv.setOnDragListener(adapter.getDragInstance());
|
||||||
|
|
||||||
|
//delete row on LongClick
|
||||||
|
tv.setOnLongClickListener(new View.OnLongClickListener() {
|
||||||
|
@Override
|
||||||
|
public boolean onLongClick(View tvView) {
|
||||||
|
showDeleteDialog(tvView);
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
rec_bottom.setOnDragListener(adapter.getDragInstance());
|
rec_bottom.setOnDragListener(adapter.getDragInstance());
|
||||||
|
|
||||||
setEmptyListBottom(false, tv.getId(), rec_bottom);
|
setEmptyListBottom(false, tv.getId(), rec_bottom);
|
||||||
@@ -299,6 +310,18 @@ public class NoCameraActivity extends AppCompatActivity implements Listener {
|
|||||||
rec_bottom.setAdapter(adapter);
|
rec_bottom.setAdapter(adapter);
|
||||||
|
|
||||||
tv.setOnDragListener(adapter.getDragInstance());
|
tv.setOnDragListener(adapter.getDragInstance());
|
||||||
|
|
||||||
|
//delete row on LongClick
|
||||||
|
tv.setOnLongClickListener(new View.OnLongClickListener() {
|
||||||
|
@Override
|
||||||
|
public boolean onLongClick(View tvView) {
|
||||||
|
showDeleteDialog(tvView);
|
||||||
|
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
rec_bottom.setOnDragListener(adapter.getDragInstance());
|
rec_bottom.setOnDragListener(adapter.getDragInstance());
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -354,6 +377,13 @@ public class NoCameraActivity extends AppCompatActivity implements Listener {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
fab_add.setOnClickListener(new View.OnClickListener() {
|
||||||
|
@Override
|
||||||
|
public void onClick(View v) {
|
||||||
|
addRow();
|
||||||
|
}
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
private int getTotalUnit(List<NoCameraDataGetterSetter> sku_group_master) {
|
private int getTotalUnit(List<NoCameraDataGetterSetter> sku_group_master) {
|
||||||
@@ -1164,4 +1194,138 @@ public class NoCameraActivity extends AppCompatActivity implements Listener {
|
|||||||
}
|
}
|
||||||
return width;
|
return width;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void addRow(){
|
||||||
|
DynamycIdsGetterSetter dynamic_ids = new DynamycIdsGetterSetter();
|
||||||
|
|
||||||
|
// first Button
|
||||||
|
RelativeLayout rLayout = new RelativeLayout(getApplicationContext());
|
||||||
|
RelativeLayout.LayoutParams lprams = new RelativeLayout.LayoutParams(
|
||||||
|
RelativeLayout.LayoutParams.MATCH_PARENT,
|
||||||
|
RelativeLayout.LayoutParams.WRAP_CONTENT);
|
||||||
|
TextView tv = new TextView(getApplicationContext());
|
||||||
|
//tv.setHeight(60);
|
||||||
|
tv.setTextSize(20);
|
||||||
|
tv.setBackgroundColor(getResources().getColor(R.color.grey_textview));
|
||||||
|
tv.setText("Drop SKU Groups Here ");
|
||||||
|
tv.setPadding(5, 20, 0, 20);
|
||||||
|
tv.setLayoutParams(lprams);
|
||||||
|
int tv_id = View.generateViewId();
|
||||||
|
tv.setId(tv_id);
|
||||||
|
|
||||||
|
//set dynamic textview id to object
|
||||||
|
dynamic_ids.setTextview_id(tv_id);
|
||||||
|
|
||||||
|
RecyclerView rec_bottom = new RecyclerView(getApplicationContext());
|
||||||
|
int rec_id = View.generateViewId();
|
||||||
|
|
||||||
|
//set dynamic recycler id to object
|
||||||
|
dynamic_ids.setRecycler_id(rec_id);
|
||||||
|
|
||||||
|
rec_bottom.setLayoutParams(lprams);
|
||||||
|
rec_bottom.setPadding(0, 0, 0, 0);
|
||||||
|
|
||||||
|
rec_bottom.setVisibility(View.GONE);
|
||||||
|
|
||||||
|
rec_bottom.setId(rec_id);
|
||||||
|
rec_bottom.setBackgroundColor(getResources().getColor(R.color.grey_background));
|
||||||
|
|
||||||
|
RelativeLayout.LayoutParams lprams2 = new RelativeLayout.LayoutParams(
|
||||||
|
RelativeLayout.LayoutParams.MATCH_PARENT,
|
||||||
|
RelativeLayout.LayoutParams.WRAP_CONTENT);
|
||||||
|
lprams2.height = 2;
|
||||||
|
View view = new View(getApplicationContext());
|
||||||
|
view.setBackgroundColor(getResources().getColor(R.color.white));
|
||||||
|
view.setLayoutParams(lprams2);
|
||||||
|
|
||||||
|
rLayout.addView(tv);
|
||||||
|
rLayout.addView(rec_bottom);
|
||||||
|
rLayout.addView(view);
|
||||||
|
rLayout.setBackgroundColor(getResources().getColor(R.color.white));
|
||||||
|
|
||||||
|
linear_bottom_parent.addView(rLayout);
|
||||||
|
|
||||||
|
ids.add(dynamic_ids);
|
||||||
|
|
||||||
|
rec_bottom.setLayoutManager(new LinearLayoutManager(
|
||||||
|
this, LinearLayoutManager.HORIZONTAL, false));
|
||||||
|
|
||||||
|
List<BrandMasterGetterSetter> bottomList = new ArrayList<>();
|
||||||
|
|
||||||
|
/* bottomList.add("C");
|
||||||
|
bottomList.add("D");*/
|
||||||
|
|
||||||
|
/*setEmptyListBottom(true);
|
||||||
|
ListAdapter bottomListAdapter = new ListAdapter(bottomList, this);
|
||||||
|
rvBottom.setAdapter(bottomListAdapter);*/
|
||||||
|
|
||||||
|
List<NoCameraDataGetterSetter> brands = new ArrayList<>();
|
||||||
|
|
||||||
|
MyAdapter adapter = new MyAdapter(getApplicationContext(), brands, this, rec_bottom);
|
||||||
|
rec_bottom.setAdapter(adapter);
|
||||||
|
|
||||||
|
tv.setOnDragListener(adapter.getDragInstance());
|
||||||
|
|
||||||
|
//delete row on LongClick
|
||||||
|
tv.setOnLongClickListener(new View.OnLongClickListener() {
|
||||||
|
@Override
|
||||||
|
public boolean onLongClick(final View tvView) {
|
||||||
|
|
||||||
|
showDeleteDialog(tvView);
|
||||||
|
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
rec_bottom.setOnDragListener(adapter.getDragInstance());
|
||||||
|
|
||||||
|
//increase No of rows
|
||||||
|
number_of_rows++;
|
||||||
|
}
|
||||||
|
|
||||||
|
void showDeleteDialog(final View tvView){
|
||||||
|
|
||||||
|
final Dialog dialog = new Dialog(NoCameraActivity.this);
|
||||||
|
dialog.requestWindowFeature(Window.FEATURE_NO_TITLE);
|
||||||
|
dialog.getWindow().setBackgroundDrawable(new ColorDrawable(Color.TRANSPARENT));
|
||||||
|
dialog.setContentView(R.layout.delete_row_alert_dialog);
|
||||||
|
|
||||||
|
final Button btn_no = (Button) dialog.findViewById(R.id.btn_no);
|
||||||
|
final Button btn_yes = (Button) dialog.findViewById(R.id.btn_yes);
|
||||||
|
|
||||||
|
btn_yes.setOnClickListener(new View.OnClickListener() {
|
||||||
|
@Override
|
||||||
|
public void onClick(View v) {
|
||||||
|
|
||||||
|
int position = -1;
|
||||||
|
|
||||||
|
for (int i = 0; i < ids.size(); i++) {
|
||||||
|
|
||||||
|
if (ids.get(i).getTextview_id() == tvView.getId()) {
|
||||||
|
position = i;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if(position!=-1){
|
||||||
|
linear_bottom_parent.removeViewAt(position);
|
||||||
|
linear_bottom_parent.invalidate();
|
||||||
|
|
||||||
|
ids.remove(position);
|
||||||
|
--number_of_rows;
|
||||||
|
}
|
||||||
|
|
||||||
|
dialog.cancel();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
btn_no.setOnClickListener(new View.OnClickListener() {
|
||||||
|
@Override
|
||||||
|
public void onClick(View v) {
|
||||||
|
dialog.cancel();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
dialog.show();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -147,7 +147,16 @@ public class NonWorkingReason extends AppCompatActivity implements
|
|||||||
database.open();
|
database.open();
|
||||||
str = CommonString.FILE_PATH;
|
str = CommonString.FILE_PATH;
|
||||||
|
|
||||||
storelist = database.getStoreData(visit_date,CommonString.KEY_JOURNEY_PLAN );
|
//storelist = database.getStoreData(visit_date,CommonString.KEY_JOURNEY_PLAN );
|
||||||
|
|
||||||
|
if(store_flag_str.equals(CommonString.FROM_JCP)){
|
||||||
|
|
||||||
|
storelist = database.getStoreData(visit_date,CommonString.KEY_JOURNEY_PLAN );
|
||||||
|
}
|
||||||
|
else if(store_flag_str.equals(CommonString.FROM_ADDITIONAL)){
|
||||||
|
//Additional Journey Plan - Egypt
|
||||||
|
storelist = database.getStoreData(visit_date,CommonString.KEY_JOURNEY_PLAN_ADDITIONAL);
|
||||||
|
}
|
||||||
|
|
||||||
coverage = database.getCoverageData(visit_date, CommonString.FROM_JCP);
|
coverage = database.getCoverageData(visit_date, CommonString.FROM_JCP);
|
||||||
|
|
||||||
@@ -484,7 +493,8 @@ public class NonWorkingReason extends AppCompatActivity implements
|
|||||||
|
|
||||||
database.InsertCoverageData(cdata);
|
database.InsertCoverageData(cdata);
|
||||||
|
|
||||||
database.updateStoreStatusOnLeave(store_id, visit_date, CommonString.STORE_STATUS_LEAVE, CommonString.FROM_JCP);
|
database.updateStoreStatusOnLeave(store_id, visit_date, CommonString.STORE_STATUS_LEAVE, store_flag_str);
|
||||||
|
|
||||||
|
|
||||||
SharedPreferences.Editor editor = preferences.edit();
|
SharedPreferences.Editor editor = preferences.edit();
|
||||||
|
|
||||||
@@ -523,7 +533,8 @@ public class NonWorkingReason extends AppCompatActivity implements
|
|||||||
|
|
||||||
database.InsertCoverageData(cdata);
|
database.InsertCoverageData(cdata);
|
||||||
|
|
||||||
database.updateStoreStatusOnLeave(store_id, visit_date, CommonString.STORE_STATUS_LEAVE, CommonString.FROM_JCP);
|
//database.updateStoreStatusOnLeave(store_id, visit_date, CommonString.STORE_STATUS_LEAVE, CommonString.FROM_JCP);
|
||||||
|
database.updateStoreStatusOnLeave(store_id, visit_date, CommonString.STORE_STATUS_LEAVE, store_flag_str);
|
||||||
|
|
||||||
SharedPreferences.Editor editor = preferences
|
SharedPreferences.Editor editor = preferences
|
||||||
.edit();
|
.edit();
|
||||||
@@ -683,7 +694,7 @@ public class NonWorkingReason extends AppCompatActivity implements
|
|||||||
GSKOrangeDB db = new GSKOrangeDB(NonWorkingReason.this);
|
GSKOrangeDB db = new GSKOrangeDB(NonWorkingReason.this);
|
||||||
db.open();
|
db.open();
|
||||||
|
|
||||||
coverage = db.getCoverageWithStoreID_Data(store_id);
|
coverage = db.getCoverageWithStoreID_Data(store_id, visit_date);
|
||||||
|
|
||||||
// uploading Geotag
|
// uploading Geotag
|
||||||
|
|
||||||
@@ -691,52 +702,61 @@ public class NonWorkingReason extends AppCompatActivity implements
|
|||||||
SAXParser saxP = saxPF.newSAXParser();
|
SAXParser saxP = saxPF.newSAXParser();
|
||||||
XMLReader xmlR = saxP.getXMLReader();
|
XMLReader xmlR = saxP.getXMLReader();
|
||||||
|
|
||||||
|
String service;
|
||||||
|
|
||||||
|
if(coverage.get(0).getFlag_from().equals(CommonString.FROM_ADDITIONAL)){
|
||||||
|
service = CommonString.METHOD_UPLOAD_CURRENT_DATA_ADDITIONAL;
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
service = CommonString.METHOD_UPLOAD_CURRENT_DATA;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
String current_xml = "";
|
String current_xml = "";
|
||||||
|
|
||||||
if (coverage.size() > 0) {
|
if (coverage.size() > 0) {
|
||||||
|
|
||||||
for (int i = 0; i < coverage.size(); i++) {
|
//for (int i = 0; i < coverage.size(); i++) {
|
||||||
|
|
||||||
|
|
||||||
String onXML = "[Coverage_Intime][USER_ID]"
|
String onXML = "[Coverage_Intime][USER_ID]"
|
||||||
+ _UserId
|
+ _UserId
|
||||||
+ "[/USER_ID]"
|
+ "[/USER_ID]"
|
||||||
+ "[STORE_ID]"
|
+ "[STORE_ID]"
|
||||||
+ coverage.get(i).getStoreId()
|
+ coverage.get(0).getStoreId()
|
||||||
+ "[/STORE_ID]"
|
+ "[/STORE_ID]"
|
||||||
+ "[VISIT_DATE]"
|
+ "[VISIT_DATE]"
|
||||||
+ coverage.get(i).getVisitDate()
|
+ coverage.get(0).getVisitDate()
|
||||||
+ "[/VISIT_DATE]"
|
+ "[/VISIT_DATE]"
|
||||||
+ "[IN_TIME]"
|
+ "[IN_TIME]"
|
||||||
+ coverage.get(i).getInTime()
|
+ coverage.get(0).getInTime()
|
||||||
+ "[/IN_TIME]"
|
+ "[/IN_TIME]"
|
||||||
+ "[LATITUDE]"
|
+ "[LATITUDE]"
|
||||||
+ coverage.get(i).getLatitude()
|
+ coverage.get(0).getLatitude()
|
||||||
+ "[/LATITUDE]"
|
+ "[/LATITUDE]"
|
||||||
+ "[LONGITUDE ]"
|
+ "[LONGITUDE ]"
|
||||||
+ coverage.get(i).getLongitude()
|
+ coverage.get(0).getLongitude()
|
||||||
+ "[/LONGITUDE ]"
|
+ "[/LONGITUDE ]"
|
||||||
+ "[REASON_ID]"
|
+ "[REASON_ID]"
|
||||||
+ coverage.get(i).getReasonid()
|
+ coverage.get(0).getReasonid()
|
||||||
+ "[/REASON_ID]"
|
+ "[/REASON_ID]"
|
||||||
+ "[REMARK]"
|
+ "[REMARK]"
|
||||||
+ coverage.get(i).getReason()
|
+ coverage.get(0).getReason()
|
||||||
+ "[/REMARK][/Coverage_Intime]";
|
+ "[/REMARK][/Coverage_Intime]";
|
||||||
|
|
||||||
current_xml = current_xml + onXML;
|
//current_xml = current_xml + onXML;
|
||||||
|
|
||||||
|
|
||||||
}
|
//}
|
||||||
|
|
||||||
current_xml = "[DATA]" + current_xml
|
current_xml = "[DATA]" + onXML
|
||||||
+ "[/DATA]";
|
+ "[/DATA]";
|
||||||
|
|
||||||
SoapObject request = new SoapObject(CommonString.NAMESPACE,
|
SoapObject request = new SoapObject(CommonString.NAMESPACE,
|
||||||
CommonString.METHOD_UPLOAD_CURRENT_DATA);
|
service);
|
||||||
//request.addProperty("MID", "0");
|
//request.addProperty("MID", "0");
|
||||||
// request.addProperty("KEYS", "CURRENT_DATA");
|
// request.addProperty("KEYS", "CURRENT_DATA");
|
||||||
// request.addProperty("USERNAME", username);
|
// request.addProperty("USERNAME", username);
|
||||||
|
|
||||||
request.addProperty("onXML", current_xml);
|
request.addProperty("onXML", current_xml);
|
||||||
|
|
||||||
@@ -748,7 +768,7 @@ public class NonWorkingReason extends AppCompatActivity implements
|
|||||||
HttpTransportSE androidHttpTransport = new HttpTransportSE(
|
HttpTransportSE androidHttpTransport = new HttpTransportSE(
|
||||||
CommonString.URL);
|
CommonString.URL);
|
||||||
androidHttpTransport.call(
|
androidHttpTransport.call(
|
||||||
CommonString.SOAP_ACTION_UPLOAD_CURRRENT_DATA, envelope);
|
CommonString.SOAP_ACTION + service, envelope);
|
||||||
Object result = (Object) envelope.getResponse();
|
Object result = (Object) envelope.getResponse();
|
||||||
|
|
||||||
if (result.toString().equalsIgnoreCase(
|
if (result.toString().equalsIgnoreCase(
|
||||||
@@ -759,7 +779,7 @@ public class NonWorkingReason extends AppCompatActivity implements
|
|||||||
|
|
||||||
if (result.toString().equalsIgnoreCase(
|
if (result.toString().equalsIgnoreCase(
|
||||||
CommonString.KEY_FALSE)) {
|
CommonString.KEY_FALSE)) {
|
||||||
return CommonString.METHOD_UPLOAD_CURRENT_DATA;
|
return service;
|
||||||
}
|
}
|
||||||
|
|
||||||
// for failure
|
// for failure
|
||||||
|
|||||||
@@ -91,7 +91,7 @@ public class SettingsActivity extends AppCompatActivity implements SelectLanguag
|
|||||||
this.notice_url = notice_url;
|
this.notice_url = notice_url;
|
||||||
|
|
||||||
if (!selected_lang.equals("")) {
|
if (!selected_lang.equals("")) {
|
||||||
fab.setVisibility(View.VISIBLE);
|
fab.show();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,634 @@
|
|||||||
|
package cpm.com.gskmtorange.dailyentry;
|
||||||
|
|
||||||
|
import android.app.AlertDialog;
|
||||||
|
import android.content.Context;
|
||||||
|
import android.content.DialogInterface;
|
||||||
|
import android.content.SharedPreferences;
|
||||||
|
import android.graphics.Typeface;
|
||||||
|
import android.os.Bundle;
|
||||||
|
import android.preference.PreferenceManager;
|
||||||
|
import android.support.design.widget.FloatingActionButton;
|
||||||
|
import android.support.design.widget.Snackbar;
|
||||||
|
import android.support.v7.app.AppCompatActivity;
|
||||||
|
import android.support.v7.widget.CardView;
|
||||||
|
import android.support.v7.widget.Toolbar;
|
||||||
|
import android.view.LayoutInflater;
|
||||||
|
import android.view.MenuItem;
|
||||||
|
import android.view.View;
|
||||||
|
import android.view.ViewGroup;
|
||||||
|
import android.view.inputmethod.InputMethodManager;
|
||||||
|
import android.widget.AbsListView;
|
||||||
|
import android.widget.BaseExpandableListAdapter;
|
||||||
|
import android.widget.EditText;
|
||||||
|
import android.widget.ExpandableListView;
|
||||||
|
import android.widget.ImageView;
|
||||||
|
import android.widget.LinearLayout;
|
||||||
|
import android.widget.RelativeLayout;
|
||||||
|
import android.widget.TextView;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.HashMap;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
import cpm.com.gskmtorange.Database.GSKOrangeDB;
|
||||||
|
import cpm.com.gskmtorange.R;
|
||||||
|
import cpm.com.gskmtorange.constant.CommonFunctions;
|
||||||
|
import cpm.com.gskmtorange.constant.CommonString;
|
||||||
|
import cpm.com.gskmtorange.interfaces.DialogCallbackListener;
|
||||||
|
import cpm.com.gskmtorange.xmlGetterSetter.MSL_AvailabilityStockFacingGetterSetter;
|
||||||
|
|
||||||
|
public class StockActivity extends AppCompatActivity implements DialogCallbackListener {
|
||||||
|
|
||||||
|
GSKOrangeDB db;
|
||||||
|
|
||||||
|
String categoryName, categoryId, storeId, Error_Message = "";
|
||||||
|
String store_id, visit_date, username, intime, date, keyAccount_id, class_id, storeType_id, country_id, store_flag_str;
|
||||||
|
boolean isDialogOpen = true;
|
||||||
|
private SharedPreferences preferences;
|
||||||
|
int scrollPosition = 0;
|
||||||
|
|
||||||
|
ExpandableListView expandableListView;
|
||||||
|
ExpandableListAdapter adapter;
|
||||||
|
|
||||||
|
ArrayList<MSL_AvailabilityStockFacingGetterSetter> headerDataList;
|
||||||
|
ArrayList<MSL_AvailabilityStockFacingGetterSetter> childDataList;
|
||||||
|
List<MSL_AvailabilityStockFacingGetterSetter> hashMapListHeaderData;
|
||||||
|
HashMap<MSL_AvailabilityStockFacingGetterSetter, List<MSL_AvailabilityStockFacingGetterSetter>> hashMapListChildData;
|
||||||
|
|
||||||
|
List<Integer> checkHeaderArray = new ArrayList<>();
|
||||||
|
boolean checkflag = true;
|
||||||
|
FloatingActionButton fab;
|
||||||
|
boolean editFlag = false;
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected void onCreate(Bundle savedInstanceState) {
|
||||||
|
super.onCreate(savedInstanceState);
|
||||||
|
setContentView(R.layout.activity_stock);
|
||||||
|
Toolbar toolbar = (Toolbar) findViewById(R.id.toolbar);
|
||||||
|
setSupportActionBar(toolbar);
|
||||||
|
|
||||||
|
getSupportActionBar().setDisplayHomeAsUpEnabled(true);
|
||||||
|
|
||||||
|
preferences = PreferenceManager.getDefaultSharedPreferences(this);
|
||||||
|
CommonFunctions.updateLangResources(getApplicationContext(), preferences.getString(CommonString.KEY_LANGUAGE, ""));
|
||||||
|
store_id = preferences.getString(CommonString.KEY_STORE_ID, null);
|
||||||
|
visit_date = preferences.getString(CommonString.KEY_DATE, null);
|
||||||
|
date = preferences.getString(CommonString.KEY_DATE, null);
|
||||||
|
username = preferences.getString(CommonString.KEY_USERNAME, null);
|
||||||
|
intime = preferences.getString(CommonString.KEY_STORE_IN_TIME, "");
|
||||||
|
keyAccount_id = preferences.getString(CommonString.KEY_KEYACCOUNT_ID, "");
|
||||||
|
class_id = preferences.getString(CommonString.KEY_CLASS_ID, "");
|
||||||
|
storeType_id = preferences.getString(CommonString.KEY_STORETYPE_ID, "");
|
||||||
|
country_id = preferences.getString(CommonString.KEY_COUNTRY_ID, "");
|
||||||
|
store_flag_str = preferences.getString(CommonString.KEY_STORE_FLAG, null);
|
||||||
|
|
||||||
|
expandableListView = (ExpandableListView) findViewById(R.id.expandableListView);
|
||||||
|
|
||||||
|
db = new GSKOrangeDB(this);
|
||||||
|
db.open();
|
||||||
|
|
||||||
|
//Intent data
|
||||||
|
categoryName = getIntent().getStringExtra("categoryName");
|
||||||
|
categoryId = getIntent().getStringExtra("categoryId");
|
||||||
|
|
||||||
|
//txt_mslAvailabilityName.setText(getResources().getString(R.string.title_activity_msl__availability));
|
||||||
|
toolbar.setTitle(getResources().getString(R.string.title_activity_stock_data));
|
||||||
|
|
||||||
|
fab = (FloatingActionButton) findViewById(R.id.fab);
|
||||||
|
fab.setOnClickListener(new View.OnClickListener() {
|
||||||
|
@Override
|
||||||
|
public void onClick(View view) {
|
||||||
|
|
||||||
|
expandableListView.clearFocus();
|
||||||
|
|
||||||
|
if (validateData(hashMapListHeaderData, hashMapListChildData)) {
|
||||||
|
/*AlertDialog.Builder builder = new AlertDialog.Builder(StockActivity.this);
|
||||||
|
builder.setMessage(getResources().getString(R.string.check_save_message))
|
||||||
|
.setCancelable(false)
|
||||||
|
.setPositiveButton(getResources().getString(R.string.yes), new DialogInterface.OnClickListener() {
|
||||||
|
public void onClick(DialogInterface dialog, int id) {
|
||||||
|
|
||||||
|
}
|
||||||
|
})
|
||||||
|
.setNegativeButton(getResources().getString(R.string.no), new DialogInterface.OnClickListener() {
|
||||||
|
public void onClick(DialogInterface dialog, int id) {
|
||||||
|
dialog.cancel();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
AlertDialog alert = builder.create();
|
||||||
|
alert.show();*/
|
||||||
|
|
||||||
|
db.open();
|
||||||
|
|
||||||
|
if (db.checkStockData(store_id, categoryId)) {
|
||||||
|
db.updateStockData(store_id, categoryId, hashMapListHeaderData, hashMapListChildData);
|
||||||
|
Snackbar.make(expandableListView, getResources().getString(R.string.update_message), Snackbar.LENGTH_LONG).setAction("Action", null).show();
|
||||||
|
} else {
|
||||||
|
db.InsertStockData(store_id, categoryId, hashMapListHeaderData, hashMapListChildData);
|
||||||
|
Snackbar.make(expandableListView, getResources().getString(R.string.save_message), Snackbar.LENGTH_LONG).setAction("Action", null).show();
|
||||||
|
}
|
||||||
|
finish();
|
||||||
|
overridePendingTransition(R.anim.activity_back_in, R.anim.activity_back_out);
|
||||||
|
} else {
|
||||||
|
|
||||||
|
for (int i = 0; i < adapter.getGroupCount(); i++)
|
||||||
|
expandableListView.expandGroup(i);
|
||||||
|
|
||||||
|
/* AlertDialog.Builder builder = new AlertDialog.Builder(StockActivity.this);
|
||||||
|
builder.setMessage(Error_Message)
|
||||||
|
.setCancelable(false)
|
||||||
|
.setPositiveButton(R.string.ok, new DialogInterface.OnClickListener() {
|
||||||
|
public void onClick(DialogInterface dialog, int id) {
|
||||||
|
expandableListView.smoothScrollToPosition(scrollPosition);
|
||||||
|
|
||||||
|
if (!expandableListView.isGroupExpanded(scrollPosition)) {
|
||||||
|
expandableListView.expandGroup(scrollPosition);
|
||||||
|
}
|
||||||
|
dialog.dismiss();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
AlertDialog alert = builder.create();
|
||||||
|
alert.show();*/
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
expandableListView.setOnScrollListener(new AbsListView.OnScrollListener() {
|
||||||
|
@Override
|
||||||
|
public void onScroll(AbsListView view, int firstVisibleItem, int visibleItemCount, int totalItemCount) {
|
||||||
|
|
||||||
|
expandableListView.invalidate();
|
||||||
|
|
||||||
|
int lastItem = firstVisibleItem + visibleItemCount;
|
||||||
|
|
||||||
|
if (firstVisibleItem == 0) {
|
||||||
|
fab.show();//setVisibility(View.VISIBLE);
|
||||||
|
} else if (lastItem == totalItemCount) {
|
||||||
|
fab.hide();//setVisibility(View.INVISIBLE);
|
||||||
|
} else {
|
||||||
|
fab.show();//setVisibility(View.VISIBLE);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onScrollStateChanged(AbsListView arg0, int arg1) {
|
||||||
|
InputMethodManager inputManager = (InputMethodManager) getApplicationContext()
|
||||||
|
.getSystemService(Context.INPUT_METHOD_SERVICE);
|
||||||
|
if (getCurrentFocus() != null) {
|
||||||
|
inputManager.hideSoftInputFromWindow(getCurrentFocus().getWindowToken(), 0);
|
||||||
|
getCurrentFocus().clearFocus();
|
||||||
|
}
|
||||||
|
|
||||||
|
expandableListView.invalidateViews();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
// Listview Group click listener
|
||||||
|
expandableListView.setOnGroupClickListener(new ExpandableListView.OnGroupClickListener() {
|
||||||
|
@Override
|
||||||
|
public boolean onGroupClick(ExpandableListView parent, View v, int groupPosition, long id) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
// Listview Group expanded listener
|
||||||
|
expandableListView.setOnGroupExpandListener(new ExpandableListView.OnGroupExpandListener() {
|
||||||
|
@Override
|
||||||
|
public void onGroupExpand(int groupPosition) {
|
||||||
|
InputMethodManager inputManager = (InputMethodManager) getApplicationContext()
|
||||||
|
.getSystemService(Context.INPUT_METHOD_SERVICE);
|
||||||
|
if (getWindow().getCurrentFocus() != null) {
|
||||||
|
inputManager.hideSoftInputFromWindow(getCurrentFocus().getWindowToken(), 0);
|
||||||
|
getCurrentFocus().clearFocus();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
// Listview Group collasped listener
|
||||||
|
expandableListView.setOnGroupCollapseListener(new ExpandableListView.OnGroupCollapseListener() {
|
||||||
|
@Override
|
||||||
|
public void onGroupCollapse(int groupPosition) {
|
||||||
|
InputMethodManager inputManager = (InputMethodManager) getApplicationContext()
|
||||||
|
.getSystemService(Context.INPUT_METHOD_SERVICE);
|
||||||
|
if (getWindow().getCurrentFocus() != null) {
|
||||||
|
inputManager.hideSoftInputFromWindow(getCurrentFocus().getWindowToken(), 0);
|
||||||
|
getCurrentFocus().clearFocus();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
// Listview on child click listener
|
||||||
|
expandableListView.setOnChildClickListener(new ExpandableListView.OnChildClickListener() {
|
||||||
|
@Override
|
||||||
|
public boolean onChildClick(ExpandableListView parent, View v, int groupPosition,
|
||||||
|
int childPosition, long id) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
prepareList();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected void onResume() {
|
||||||
|
super.onResume();
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
private void prepareList() {
|
||||||
|
try {
|
||||||
|
hashMapListHeaderData = new ArrayList<>();
|
||||||
|
hashMapListChildData = new HashMap<>();
|
||||||
|
|
||||||
|
//Header
|
||||||
|
if(country_id.equals("7")){
|
||||||
|
headerDataList = db.getStockFacingHeaderData(categoryId, null, null, null, store_id, CommonString.TABLE_MAPPING_STOCK_STOREWISE, CommonString.TABLE_MAPPING_SOS_TARGET);
|
||||||
|
}
|
||||||
|
else if(store_flag_str.equalsIgnoreCase(CommonString.FROM_DEVIATION)) {
|
||||||
|
headerDataList = db.getStockFacingHeaderData(categoryId, keyAccount_id, storeType_id, class_id, store_id,CommonString.TABLE_MAPPING_STOCK_ADHOC, CommonString.TABLE_MAPPING_SOS_TARGET_ADHOC);
|
||||||
|
}
|
||||||
|
else if(store_flag_str.equalsIgnoreCase(CommonString.FROM_ADDITIONAL)) {
|
||||||
|
headerDataList = db.getStockFacingHeaderData(categoryId, keyAccount_id, storeType_id, class_id, store_id,CommonString.TABLE_MAPPING_STOCK_ADDITIONAL, CommonString.TABLE_MAPPING_SOS_TARGET);
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
headerDataList = db.getStockFacingHeaderData(categoryId, keyAccount_id, storeType_id, class_id, store_id,CommonString.TABLE_MAPPING_STOCK, CommonString.TABLE_MAPPING_SOS_TARGET);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if (headerDataList.size() > 0) {
|
||||||
|
for (int i = 0; i < headerDataList.size(); i++) {
|
||||||
|
hashMapListHeaderData.add(headerDataList.get(i));
|
||||||
|
|
||||||
|
//childDataList = new ArrayList<>();
|
||||||
|
childDataList = db.getStockAfterSaveData(categoryId, headerDataList.get(i).getBrand_id(), store_id);
|
||||||
|
if (!(childDataList.size() > 0)) {
|
||||||
|
if (country_id.equals("7")) {
|
||||||
|
childDataList = db.getMSL_Availability_StockFacingSKUData(categoryId, headerDataList.get(i).getBrand_id(), null, null, null, store_id, CommonString.TABLE_MAPPING_STOCK_STOREWISE);
|
||||||
|
} else if (store_flag_str.equalsIgnoreCase(CommonString.FROM_DEVIATION)) {
|
||||||
|
childDataList = db.getMSL_Availability_StockFacingSKUData(categoryId, headerDataList.get(i).getBrand_id(), keyAccount_id, storeType_id, class_id, store_id, CommonString.TABLE_MAPPING_STOCK_ADHOC);
|
||||||
|
} else if (store_flag_str.equalsIgnoreCase(CommonString.FROM_ADDITIONAL)) {
|
||||||
|
childDataList = db.getMSL_Availability_StockFacingSKUData(categoryId, headerDataList.get(i).getBrand_id(), keyAccount_id, storeType_id, class_id, store_id, CommonString.TABLE_MAPPING_STOCK_ADDITIONAL);
|
||||||
|
} else {
|
||||||
|
childDataList = db.getMSL_Availability_StockFacingSKUData(categoryId, headerDataList.get(i).getBrand_id(), keyAccount_id, storeType_id, class_id, store_id, CommonString.TABLE_MAPPING_STOCK);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
hashMapListChildData.put(hashMapListHeaderData.get(i), childDataList);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
adapter = new ExpandableListAdapter(this, hashMapListHeaderData, hashMapListChildData);
|
||||||
|
expandableListView.setAdapter(adapter);
|
||||||
|
} catch (Exception e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public class ExpandableListAdapter extends BaseExpandableListAdapter {
|
||||||
|
private Context _context;
|
||||||
|
private List<MSL_AvailabilityStockFacingGetterSetter> _listDataHeader;
|
||||||
|
private HashMap<MSL_AvailabilityStockFacingGetterSetter, List<MSL_AvailabilityStockFacingGetterSetter>> _listDataChild;
|
||||||
|
|
||||||
|
public ExpandableListAdapter(Context context, List<MSL_AvailabilityStockFacingGetterSetter> listDataHeader,
|
||||||
|
HashMap<MSL_AvailabilityStockFacingGetterSetter, List<MSL_AvailabilityStockFacingGetterSetter>> listChildData) {
|
||||||
|
this._context = context;
|
||||||
|
this._listDataHeader = listDataHeader;
|
||||||
|
this._listDataChild = listChildData;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Object getGroup(int groupPosition) {
|
||||||
|
return this._listDataHeader.get(groupPosition);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int getGroupCount() {
|
||||||
|
return this._listDataHeader.size();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public long getGroupId(int groupPosition) {
|
||||||
|
return groupPosition;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public View getGroupView(final int groupPosition, boolean isExpanded, View convertView, ViewGroup parent) {
|
||||||
|
MSL_AvailabilityStockFacingGetterSetter headerTitle = (MSL_AvailabilityStockFacingGetterSetter) getGroup(groupPosition);
|
||||||
|
|
||||||
|
if (convertView == null) {
|
||||||
|
LayoutInflater infalInflater = (LayoutInflater) this._context.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
|
||||||
|
convertView = infalInflater.inflate(R.layout.item_msl_availability_stock_facing_header, null, false);
|
||||||
|
}
|
||||||
|
|
||||||
|
TextView txt_categoryHeader = (TextView) convertView.findViewById(R.id.txt_categoryHeader);
|
||||||
|
RelativeLayout rel_header = (RelativeLayout) convertView.findViewById(R.id.rel_categoryHeader);
|
||||||
|
ImageView img_camera = (ImageView) convertView.findViewById(R.id.img_camera);
|
||||||
|
CardView card_view = (CardView) convertView.findViewById(R.id.card_view);
|
||||||
|
|
||||||
|
txt_categoryHeader.setTypeface(null, Typeface.BOLD);
|
||||||
|
|
||||||
|
if (headerTitle.getCompany_id().equals("1")) {
|
||||||
|
txt_categoryHeader.setTextColor(getResources().getColor(R.color.colorPrimaryDark));
|
||||||
|
} else {
|
||||||
|
txt_categoryHeader.setTextColor(getResources().getColor(R.color.black));
|
||||||
|
}
|
||||||
|
txt_categoryHeader.setText(headerTitle.getSub_category() + "-" + headerTitle.getBrand());
|
||||||
|
|
||||||
|
|
||||||
|
if (!checkflag) {
|
||||||
|
if (checkHeaderArray.contains(groupPosition)) {
|
||||||
|
card_view.setCardBackgroundColor(getResources().getColor(android.R.color.holo_red_dark));
|
||||||
|
} else {
|
||||||
|
card_view.setCardBackgroundColor(getResources().getColor(R.color.grey_background));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
//empty check color change
|
||||||
|
/*if (headerTitle.getCompany_id().equals("1")) {
|
||||||
|
if (!checkflag) {
|
||||||
|
if (checkHeaderArray.contains(groupPosition)) {
|
||||||
|
//card_view.setCardBackgroundColor(getResources().getColor(android.R.color.holo_red_dark));
|
||||||
|
txt_categoryHeader.setTextColor(getResources().getColor(android.R.color.holo_red_dark));
|
||||||
|
} else {
|
||||||
|
txt_categoryHeader.setTextColor(getResources().getColor(R.color.colorPrimaryDark));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
if (!checkflag) {
|
||||||
|
if (checkHeaderArray.contains(groupPosition)) {
|
||||||
|
txt_categoryHeader.setTextColor(getResources().getColor(android.R.color.holo_red_dark));
|
||||||
|
} else {
|
||||||
|
txt_categoryHeader.setTextColor(getResources().getColor(R.color.black));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}*/
|
||||||
|
|
||||||
|
return convertView;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Object getChild(int groupPosition, int childPosititon) {
|
||||||
|
return this._listDataChild.get(this._listDataHeader.get(groupPosition)).get(childPosititon);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int getChildrenCount(int groupPosition) {
|
||||||
|
return this._listDataChild.get(this._listDataHeader.get(groupPosition)).size();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public long getChildId(int groupPosition, int childPosition) {
|
||||||
|
return childPosition;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public View getChildView(final int groupPosition, final int childPosition, boolean isLastChild,
|
||||||
|
View convertView, ViewGroup parent) {
|
||||||
|
|
||||||
|
final MSL_AvailabilityStockFacingGetterSetter childData =
|
||||||
|
(MSL_AvailabilityStockFacingGetterSetter) getChild(groupPosition, childPosition);
|
||||||
|
ViewHolder holder = null;
|
||||||
|
|
||||||
|
if (convertView == null) {
|
||||||
|
LayoutInflater infalInflater = (LayoutInflater) this._context.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
|
||||||
|
convertView = infalInflater.inflate(R.layout.stock_child_item, null, false);
|
||||||
|
|
||||||
|
holder = new ViewHolder();
|
||||||
|
holder.cardView = (CardView) convertView.findViewById(R.id.card_view);
|
||||||
|
holder.lin_category = (LinearLayout) convertView.findViewById(R.id.lin_category);
|
||||||
|
|
||||||
|
holder.txt_skuName = (TextView) convertView.findViewById(R.id.txt_skuName);
|
||||||
|
|
||||||
|
holder.stock = (EditText) convertView.findViewById(R.id.ed_stock);
|
||||||
|
|
||||||
|
holder.stock_view = convertView.findViewById(R.id.stock_view);
|
||||||
|
convertView.setTag(holder);
|
||||||
|
} else {
|
||||||
|
holder = (ViewHolder) convertView.getTag();
|
||||||
|
}
|
||||||
|
|
||||||
|
holder.txt_skuName.setText(childData.getSku());
|
||||||
|
|
||||||
|
if (childData.getCompany_id().equals("1") && childData.getMust_have().equals("1")) {
|
||||||
|
holder.lin_category.setBackgroundColor(getResources().getColor(R.color.colorOrange));
|
||||||
|
|
||||||
|
} else {
|
||||||
|
|
||||||
|
holder.lin_category.setBackgroundColor(getResources().getColor(R.color.white));
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
if (childData.getCompany_id().equals("1")) {
|
||||||
|
|
||||||
|
if (childData.getMust_have().equals("1")) {
|
||||||
|
holder.txt_skuName.setTextColor(getResources().getColor(R.color.colorPrimary));
|
||||||
|
} else {
|
||||||
|
holder.txt_skuName.setTextColor(getResources().getColor(R.color.blue));
|
||||||
|
}
|
||||||
|
|
||||||
|
} else {
|
||||||
|
holder.txt_skuName.setTextColor(getResources().getColor(R.color.black));
|
||||||
|
}
|
||||||
|
|
||||||
|
final ViewHolder finalHolder = holder;
|
||||||
|
holder.stock.setOnFocusChangeListener(new View.OnFocusChangeListener() {
|
||||||
|
@Override
|
||||||
|
public void onFocusChange(View v, boolean hasFocus) {
|
||||||
|
editFlag = true;
|
||||||
|
final EditText caption = (EditText) v;
|
||||||
|
String edStock = caption.getText().toString().replaceFirst("^0+(?!$)", "");
|
||||||
|
|
||||||
|
if (edStock.equals("")) {
|
||||||
|
childData.setStock("");
|
||||||
|
} else {
|
||||||
|
childData.setStock(edStock);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
holder.stock.setText(childData.getStock());
|
||||||
|
|
||||||
|
|
||||||
|
//empty check color change
|
||||||
|
if (!checkflag) {
|
||||||
|
boolean tempflag = false;
|
||||||
|
|
||||||
|
if (childData.getCompany_id().equals("1")) {
|
||||||
|
|
||||||
|
if (holder.stock.getText().toString().equals("")) {
|
||||||
|
holder.stock.setBackgroundColor(getResources().getColor(R.color.white));
|
||||||
|
holder.stock.setHintTextColor(getResources().getColor(android.R.color.holo_red_dark));
|
||||||
|
holder.stock.setHint(getString(R.string.empty));
|
||||||
|
tempflag = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (tempflag) {
|
||||||
|
//holder.cardView.setCardBackgroundColor(getResources().getColor(android.R.color.holo_red_dark));
|
||||||
|
holder.lin_category.setBackgroundColor(getResources().getColor(android.R.color.holo_red_dark));
|
||||||
|
} else {
|
||||||
|
//holder.cardView.setCardBackgroundColor(getResources().getColor(R.color.white));
|
||||||
|
if (childData.getCompany_id().equals("1") && childData.getMust_have().equals("1")) {
|
||||||
|
holder.lin_category.setBackgroundColor(getResources().getColor(R.color.colorOrange));
|
||||||
|
} else {
|
||||||
|
holder.lin_category.setBackgroundColor(getResources().getColor(R.color.white));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
/* if (holder.facing.getText().toString().equals("")) {
|
||||||
|
holder.facing.setBackgroundColor(getResources().getColor(R.color.white));
|
||||||
|
holder.facing.setHintTextColor(getResources().getColor(android.R.color.holo_red_dark));
|
||||||
|
holder.facing.setHint(getString(R.string.empty));
|
||||||
|
tempflag = true;
|
||||||
|
}*/
|
||||||
|
if (holder.stock.getText().toString().equals("")) {
|
||||||
|
holder.stock.setBackgroundColor(getResources().getColor(R.color.white));
|
||||||
|
holder.stock.setHintTextColor(getResources().getColor(android.R.color.holo_red_dark));
|
||||||
|
holder.stock.setHint(getString(R.string.empty));
|
||||||
|
tempflag = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if (tempflag) {
|
||||||
|
//holder.cardView.setCardBackgroundColor(getResources().getColor(android.R.color.holo_red_dark));
|
||||||
|
holder.lin_category.setBackgroundColor(getResources().getColor(android.R.color.holo_red_dark));
|
||||||
|
} else {
|
||||||
|
//holder.cardView.setCardBackgroundColor(getResources().getColor(R.color.white));
|
||||||
|
if (childData.getCompany_id().equals("1") && childData.getMust_have().equals("1")) {
|
||||||
|
holder.lin_category.setBackgroundColor(getResources().getColor(R.color.colorOrange));
|
||||||
|
} else {
|
||||||
|
holder.lin_category.setBackgroundColor(getResources().getColor(R.color.white));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return convertView;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean hasStableIds() {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean isChildSelectable(int groupPosition, int childPosition) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public class ViewHolder {
|
||||||
|
CardView cardView;
|
||||||
|
TextView txt_skuName;
|
||||||
|
LinearLayout lin_category;
|
||||||
|
EditText stock;
|
||||||
|
View stock_view;
|
||||||
|
}
|
||||||
|
|
||||||
|
boolean validateData(List<MSL_AvailabilityStockFacingGetterSetter> listDataHeader,
|
||||||
|
HashMap<MSL_AvailabilityStockFacingGetterSetter, List<MSL_AvailabilityStockFacingGetterSetter>> listDataChild) {
|
||||||
|
boolean flag = true, child_flag = true, all_flag = true;
|
||||||
|
checkHeaderArray.clear();
|
||||||
|
|
||||||
|
//temp list data for empty only
|
||||||
|
List<MSL_AvailabilityStockFacingGetterSetter> listDataHeaderTemp = new ArrayList<>();
|
||||||
|
|
||||||
|
HashMap<MSL_AvailabilityStockFacingGetterSetter, List<MSL_AvailabilityStockFacingGetterSetter>> listDataChildTemp = new HashMap<>();
|
||||||
|
|
||||||
|
for (int i = 0; i < listDataHeader.size(); i++) {
|
||||||
|
|
||||||
|
flag = true;
|
||||||
|
|
||||||
|
List<MSL_AvailabilityStockFacingGetterSetter> listTemp = new ArrayList<>();
|
||||||
|
|
||||||
|
for (int j = 0; j < listDataChild.get(listDataHeader.get(i)).size(); j++) {
|
||||||
|
|
||||||
|
child_flag = true;
|
||||||
|
|
||||||
|
MSL_AvailabilityStockFacingGetterSetter data = listDataChild.get(listDataHeader.get(i)).get(j);
|
||||||
|
|
||||||
|
String stock = data.getStock();
|
||||||
|
|
||||||
|
if (stock.equals("")) {
|
||||||
|
|
||||||
|
if (!checkHeaderArray.contains(i)) {
|
||||||
|
checkHeaderArray.add(i);
|
||||||
|
}
|
||||||
|
//expandableListView.smoothScrollToPosition(i);
|
||||||
|
scrollPosition = i;
|
||||||
|
|
||||||
|
flag = false;
|
||||||
|
all_flag = false;
|
||||||
|
child_flag = false;
|
||||||
|
Error_Message = getResources().getString(R.string.stock_value);
|
||||||
|
//break;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!child_flag)
|
||||||
|
listTemp.add(data);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (flag == false) {
|
||||||
|
/* checkflag = false;
|
||||||
|
break;*/
|
||||||
|
|
||||||
|
listDataHeaderTemp.add(listDataHeader.get(i));
|
||||||
|
listDataChildTemp.put(listDataHeader.get(i), listTemp);
|
||||||
|
} else {
|
||||||
|
//checkflag = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!all_flag) {
|
||||||
|
adapter = new ExpandableListAdapter(this, listDataHeaderTemp, listDataChildTemp);
|
||||||
|
expandableListView.setAdapter(adapter);
|
||||||
|
checkflag = false;
|
||||||
|
} else {
|
||||||
|
checkflag = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
//adapter.notifyDataSetChanged();
|
||||||
|
|
||||||
|
return all_flag;
|
||||||
|
}
|
||||||
|
@Override
|
||||||
|
public void onBackPressed() {
|
||||||
|
if (editFlag) {
|
||||||
|
CommonFunctions.showAlertDialog(StockActivity.this, getResources().getString(R.string.data_will_be_lost));
|
||||||
|
} else {
|
||||||
|
finish();
|
||||||
|
overridePendingTransition(R.anim.activity_back_in, R.anim.activity_back_out);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean onOptionsItemSelected(MenuItem item) {
|
||||||
|
int id = item.getItemId();
|
||||||
|
|
||||||
|
if (id == android.R.id.home) {
|
||||||
|
|
||||||
|
if (editFlag) {
|
||||||
|
CommonFunctions.showAlertDialog(StockActivity.this, getResources().getString(R.string.data_will_be_lost));
|
||||||
|
} else {
|
||||||
|
finish();
|
||||||
|
overridePendingTransition(R.anim.activity_back_in, R.anim.activity_back_out);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return super.onOptionsItemSelected(item);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onSelect(boolean flag) {
|
||||||
|
if (flag) {
|
||||||
|
//adapter.notifyDataSetChanged();
|
||||||
|
finish();
|
||||||
|
overridePendingTransition(R.anim.activity_back_in, R.anim.activity_back_out);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onSave(boolean flag) {
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -1,9 +1,13 @@
|
|||||||
package cpm.com.gskmtorange.dailyentry;
|
package cpm.com.gskmtorange.dailyentry;
|
||||||
|
|
||||||
import android.app.AlertDialog;
|
import android.app.AlertDialog;
|
||||||
|
import android.app.Dialog;
|
||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
import android.content.DialogInterface;
|
import android.content.DialogInterface;
|
||||||
import android.content.SharedPreferences;
|
import android.content.SharedPreferences;
|
||||||
|
import android.content.pm.ActivityInfo;
|
||||||
|
import android.graphics.Bitmap;
|
||||||
|
import android.graphics.BitmapFactory;
|
||||||
import android.graphics.Typeface;
|
import android.graphics.Typeface;
|
||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
import android.preference.PreferenceManager;
|
import android.preference.PreferenceManager;
|
||||||
@@ -14,9 +18,13 @@ import android.support.v7.widget.CardView;
|
|||||||
import android.support.v7.widget.Toolbar;
|
import android.support.v7.widget.Toolbar;
|
||||||
import android.text.InputFilter;
|
import android.text.InputFilter;
|
||||||
import android.view.LayoutInflater;
|
import android.view.LayoutInflater;
|
||||||
|
import android.view.MenuItem;
|
||||||
import android.view.View;
|
import android.view.View;
|
||||||
import android.view.ViewGroup;
|
import android.view.ViewGroup;
|
||||||
|
import android.view.Window;
|
||||||
|
import android.view.WindowManager;
|
||||||
import android.view.inputmethod.InputMethodManager;
|
import android.view.inputmethod.InputMethodManager;
|
||||||
|
import android.webkit.WebView;
|
||||||
import android.widget.AbsListView;
|
import android.widget.AbsListView;
|
||||||
import android.widget.BaseExpandableListAdapter;
|
import android.widget.BaseExpandableListAdapter;
|
||||||
import android.widget.CompoundButton;
|
import android.widget.CompoundButton;
|
||||||
@@ -28,6 +36,7 @@ import android.widget.RelativeLayout;
|
|||||||
import android.widget.TextView;
|
import android.widget.TextView;
|
||||||
import android.widget.ToggleButton;
|
import android.widget.ToggleButton;
|
||||||
|
|
||||||
|
import java.io.File;
|
||||||
import java.text.DecimalFormat;
|
import java.text.DecimalFormat;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
@@ -38,9 +47,11 @@ import cpm.com.gskmtorange.R;
|
|||||||
import cpm.com.gskmtorange.constant.CommonFunctions;
|
import cpm.com.gskmtorange.constant.CommonFunctions;
|
||||||
import cpm.com.gskmtorange.constant.CommonString;
|
import cpm.com.gskmtorange.constant.CommonString;
|
||||||
import cpm.com.gskmtorange.gsk_dailyentry.MSL_Availability_StockFacingActivity;
|
import cpm.com.gskmtorange.gsk_dailyentry.MSL_Availability_StockFacingActivity;
|
||||||
|
import cpm.com.gskmtorange.interfaces.DialogCallbackListener;
|
||||||
|
import cpm.com.gskmtorange.xmlGetterSetter.MAPPING_PLANOGRAM_DataGetterSetter;
|
||||||
import cpm.com.gskmtorange.xmlGetterSetter.MSL_AvailabilityStockFacingGetterSetter;
|
import cpm.com.gskmtorange.xmlGetterSetter.MSL_AvailabilityStockFacingGetterSetter;
|
||||||
|
|
||||||
public class StockDataActivity extends AppCompatActivity {
|
public class StockDataActivity extends AppCompatActivity implements DialogCallbackListener {
|
||||||
|
|
||||||
GSKOrangeDB db;
|
GSKOrangeDB db;
|
||||||
|
|
||||||
@@ -62,6 +73,7 @@ public class StockDataActivity extends AppCompatActivity {
|
|||||||
boolean checkflag = true;
|
boolean checkflag = true;
|
||||||
FloatingActionButton fab;
|
FloatingActionButton fab;
|
||||||
|
|
||||||
|
boolean editFlag = false;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void onCreate(Bundle savedInstanceState) {
|
protected void onCreate(Bundle savedInstanceState) {
|
||||||
@@ -70,6 +82,8 @@ public class StockDataActivity extends AppCompatActivity {
|
|||||||
Toolbar toolbar = (Toolbar) findViewById(R.id.toolbar);
|
Toolbar toolbar = (Toolbar) findViewById(R.id.toolbar);
|
||||||
setSupportActionBar(toolbar);
|
setSupportActionBar(toolbar);
|
||||||
|
|
||||||
|
getSupportActionBar().setDisplayHomeAsUpEnabled(true);
|
||||||
|
|
||||||
preferences = PreferenceManager.getDefaultSharedPreferences(this);
|
preferences = PreferenceManager.getDefaultSharedPreferences(this);
|
||||||
CommonFunctions.updateLangResources(getApplicationContext(), preferences.getString(CommonString.KEY_LANGUAGE, ""));
|
CommonFunctions.updateLangResources(getApplicationContext(), preferences.getString(CommonString.KEY_LANGUAGE, ""));
|
||||||
store_id = preferences.getString(CommonString.KEY_STORE_ID, null);
|
store_id = preferences.getString(CommonString.KEY_STORE_ID, null);
|
||||||
@@ -103,22 +117,12 @@ public class StockDataActivity extends AppCompatActivity {
|
|||||||
expandableListView.clearFocus();
|
expandableListView.clearFocus();
|
||||||
|
|
||||||
if (validateData(hashMapListHeaderData, hashMapListChildData)) {
|
if (validateData(hashMapListHeaderData, hashMapListChildData)) {
|
||||||
AlertDialog.Builder builder = new AlertDialog.Builder(StockDataActivity.this);
|
/* AlertDialog.Builder builder = new AlertDialog.Builder(StockDataActivity.this);
|
||||||
builder.setMessage(getResources().getString(R.string.check_save_message))
|
builder.setMessage(getResources().getString(R.string.check_save_message))
|
||||||
.setCancelable(false)
|
.setCancelable(false)
|
||||||
.setPositiveButton(getResources().getString(R.string.yes), new DialogInterface.OnClickListener() {
|
.setPositiveButton(getResources().getString(R.string.yes), new DialogInterface.OnClickListener() {
|
||||||
public void onClick(DialogInterface dialog, int id) {
|
public void onClick(DialogInterface dialog, int id) {
|
||||||
db.open();
|
|
||||||
|
|
||||||
if (db.checkMsl_Availability_StockFacingData(store_id, categoryId)) {
|
|
||||||
db.updateMSL_Availability_StockFacing(store_id, categoryId, hashMapListHeaderData, hashMapListChildData);
|
|
||||||
Snackbar.make(expandableListView, getResources().getString(R.string.update_message), Snackbar.LENGTH_LONG).setAction("Action", null).show();
|
|
||||||
} else {
|
|
||||||
db.InsertMSL_Availability_StockFacing(store_id, categoryId, hashMapListHeaderData, hashMapListChildData);
|
|
||||||
Snackbar.make(expandableListView, getResources().getString(R.string.save_message), Snackbar.LENGTH_LONG).setAction("Action", null).show();
|
|
||||||
}
|
|
||||||
finish();
|
|
||||||
overridePendingTransition(R.anim.activity_back_in, R.anim.activity_back_out);
|
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
.setNegativeButton(getResources().getString(R.string.no), new DialogInterface.OnClickListener() {
|
.setNegativeButton(getResources().getString(R.string.no), new DialogInterface.OnClickListener() {
|
||||||
@@ -127,7 +131,20 @@ public class StockDataActivity extends AppCompatActivity {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
AlertDialog alert = builder.create();
|
AlertDialog alert = builder.create();
|
||||||
alert.show();
|
alert.show();*/
|
||||||
|
|
||||||
|
db.open();
|
||||||
|
|
||||||
|
if (db.checkMsl_Availability_StockFacingData(store_id, categoryId)) {
|
||||||
|
db.updateMSL_Availability_StockFacing(store_id, categoryId, hashMapListHeaderData, hashMapListChildData);
|
||||||
|
Snackbar.make(expandableListView, getResources().getString(R.string.update_message), Snackbar.LENGTH_LONG).setAction("Action", null).show();
|
||||||
|
} else {
|
||||||
|
db.InsertMSL_Availability_StockFacing(store_id, categoryId, hashMapListHeaderData, hashMapListChildData);
|
||||||
|
Snackbar.make(expandableListView, getResources().getString(R.string.save_message), Snackbar.LENGTH_LONG).setAction("Action", null).show();
|
||||||
|
}
|
||||||
|
finish();
|
||||||
|
overridePendingTransition(R.anim.activity_back_in, R.anim.activity_back_out);
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
AlertDialog.Builder builder = new AlertDialog.Builder(StockDataActivity.this);
|
AlertDialog.Builder builder = new AlertDialog.Builder(StockDataActivity.this);
|
||||||
builder.setMessage(Error_Message)
|
builder.setMessage(Error_Message)
|
||||||
@@ -267,6 +284,20 @@ public class StockDataActivity extends AppCompatActivity {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onSelect(boolean flag) {
|
||||||
|
if (flag) {
|
||||||
|
//adapter.notifyDataSetChanged();
|
||||||
|
finish();
|
||||||
|
overridePendingTransition(R.anim.activity_back_in, R.anim.activity_back_out);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onSave(boolean flag) {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
public class ExpandableListAdapter extends BaseExpandableListAdapter {
|
public class ExpandableListAdapter extends BaseExpandableListAdapter {
|
||||||
private Context _context;
|
private Context _context;
|
||||||
private List<MSL_AvailabilityStockFacingGetterSetter> _listDataHeader;
|
private List<MSL_AvailabilityStockFacingGetterSetter> _listDataHeader;
|
||||||
@@ -492,6 +523,9 @@ public class StockDataActivity extends AppCompatActivity {
|
|||||||
holder.stock.setOnFocusChangeListener(new View.OnFocusChangeListener() {
|
holder.stock.setOnFocusChangeListener(new View.OnFocusChangeListener() {
|
||||||
@Override
|
@Override
|
||||||
public void onFocusChange(View v, boolean hasFocus) {
|
public void onFocusChange(View v, boolean hasFocus) {
|
||||||
|
|
||||||
|
editFlag = true;
|
||||||
|
|
||||||
final EditText caption = (EditText) v;
|
final EditText caption = (EditText) v;
|
||||||
String edStock = caption.getText().toString().replaceFirst("^0+(?!$)", "");
|
String edStock = caption.getText().toString().replaceFirst("^0+(?!$)", "");
|
||||||
|
|
||||||
@@ -537,6 +571,9 @@ public class StockDataActivity extends AppCompatActivity {
|
|||||||
holder.facing.setOnFocusChangeListener(new View.OnFocusChangeListener() {
|
holder.facing.setOnFocusChangeListener(new View.OnFocusChangeListener() {
|
||||||
@Override
|
@Override
|
||||||
public void onFocusChange(View v, boolean hasFocus) {
|
public void onFocusChange(View v, boolean hasFocus) {
|
||||||
|
|
||||||
|
editFlag = true;
|
||||||
|
|
||||||
final EditText caption = (EditText) v;
|
final EditText caption = (EditText) v;
|
||||||
boolean isFill = false;
|
boolean isFill = false;
|
||||||
String edFaceup = caption.getText().toString().replaceFirst("^0+(?!$)", "");
|
String edFaceup = caption.getText().toString().replaceFirst("^0+(?!$)", "");
|
||||||
@@ -778,5 +815,30 @@ public class StockDataActivity extends AppCompatActivity {
|
|||||||
return checkflag;
|
return checkflag;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean onOptionsItemSelected(MenuItem item) {
|
||||||
|
int id = item.getItemId();
|
||||||
|
|
||||||
|
if (id == android.R.id.home) {
|
||||||
|
|
||||||
|
if (editFlag) {
|
||||||
|
CommonFunctions.showAlertDialog(StockDataActivity.this, getResources().getString(R.string.data_will_be_lost));
|
||||||
|
} else {
|
||||||
|
finish();
|
||||||
|
overridePendingTransition(R.anim.activity_back_in, R.anim.activity_back_out);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return super.onOptionsItemSelected(item);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onBackPressed() {
|
||||||
|
if (editFlag) {
|
||||||
|
CommonFunctions.showAlertDialog(StockDataActivity.this, getResources().getString(R.string.data_will_be_lost));
|
||||||
|
} else {
|
||||||
|
finish();
|
||||||
|
overridePendingTransition(R.anim.activity_back_in, R.anim.activity_back_out);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -408,7 +408,7 @@ public class StoreCheckoutImageActivity extends AppCompatActivity implements Vie
|
|||||||
GSKOrangeDB db = new GSKOrangeDB(StoreCheckoutImageActivity.this);
|
GSKOrangeDB db = new GSKOrangeDB(StoreCheckoutImageActivity.this);
|
||||||
db.open();
|
db.open();
|
||||||
|
|
||||||
coverage = db.getCoverageWithStoreID_Data(store_id);
|
coverage = db.getCoverageWithStoreID_Data(store_id, visit_date);
|
||||||
|
|
||||||
// uploading Geotag
|
// uploading Geotag
|
||||||
|
|
||||||
|
|||||||
@@ -92,10 +92,12 @@ import cpm.com.gskmtorange.GetterSetter.CoverageBean;
|
|||||||
import cpm.com.gskmtorange.GetterSetter.GeotaggingBeans;
|
import cpm.com.gskmtorange.GetterSetter.GeotaggingBeans;
|
||||||
import cpm.com.gskmtorange.GetterSetter.StoreBean;
|
import cpm.com.gskmtorange.GetterSetter.StoreBean;
|
||||||
import cpm.com.gskmtorange.R;
|
import cpm.com.gskmtorange.R;
|
||||||
|
import cpm.com.gskmtorange.comparators.StatusCompare;
|
||||||
import cpm.com.gskmtorange.constant.CommonFunctions;
|
import cpm.com.gskmtorange.constant.CommonFunctions;
|
||||||
import cpm.com.gskmtorange.constant.CommonString;
|
import cpm.com.gskmtorange.constant.CommonString;
|
||||||
import cpm.com.gskmtorange.download.DownloadActivity;
|
import cpm.com.gskmtorange.download.DownloadActivity;
|
||||||
import cpm.com.gskmtorange.gsk_dailyentry.StoreWisePerformanceActivity;
|
import cpm.com.gskmtorange.gsk_dailyentry.StoreWisePerformanceActivity;
|
||||||
|
import cpm.com.gskmtorange.pharma_stores.PharmaActivity;
|
||||||
import cpm.com.gskmtorange.storeinmap.StoreListMapActivity;
|
import cpm.com.gskmtorange.storeinmap.StoreListMapActivity;
|
||||||
import cpm.com.gskmtorange.storeinmap.StoreListRouteActivity;
|
import cpm.com.gskmtorange.storeinmap.StoreListRouteActivity;
|
||||||
import cpm.com.gskmtorange.storeinmap.StoreRouteActivity;
|
import cpm.com.gskmtorange.storeinmap.StoreRouteActivity;
|
||||||
@@ -214,6 +216,8 @@ public class StoreListActivity extends AppCompatActivity implements GoogleApiCli
|
|||||||
String str;
|
String str;
|
||||||
StoreBean storeCurrentObj;
|
StoreBean storeCurrentObj;
|
||||||
|
|
||||||
|
String from_checkedIn = "";
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void onCreate(Bundle savedInstanceState) {
|
protected void onCreate(Bundle savedInstanceState) {
|
||||||
super.onCreate(savedInstanceState);
|
super.onCreate(savedInstanceState);
|
||||||
@@ -486,7 +490,17 @@ public class StoreListActivity extends AppCompatActivity implements GoogleApiCli
|
|||||||
toolbar.setTitle(getString(R.string.title_activity_store_list));
|
toolbar.setTitle(getString(R.string.title_activity_store_list));
|
||||||
storelist = db.getStoreData(date,CommonString.KEY_JOURNEY_PLAN );
|
storelist = db.getStoreData(date,CommonString.KEY_JOURNEY_PLAN );
|
||||||
}
|
}
|
||||||
else {
|
else if(store_flag_str.equals(CommonString.FROM_ADDITIONAL)){
|
||||||
|
//Additional Journey Plan - Egypt
|
||||||
|
toolbar.setTitle(getString(R.string.title_activity_store_list));
|
||||||
|
storelist = db.getStoreData(date,CommonString.KEY_JOURNEY_PLAN_ADDITIONAL);
|
||||||
|
}
|
||||||
|
else if(store_flag_str.equals(CommonString.FROM_PHARMA)){
|
||||||
|
//Additional Journey Plan - Egypt
|
||||||
|
toolbar.setTitle(getString(R.string.title_activity_store_list));
|
||||||
|
storelist = db.getStoreData(date,CommonString.KEY_JOURNEY_PLAN_PHARMA);
|
||||||
|
}
|
||||||
|
else{
|
||||||
toolbar.setTitle(getString(R.string.adhoc_store_list));
|
toolbar.setTitle(getString(R.string.adhoc_store_list));
|
||||||
storelist = db.getStoreData(date,CommonString.KEY_ADHOC_JOURNEY_PLAN );
|
storelist = db.getStoreData(date,CommonString.KEY_ADHOC_JOURNEY_PLAN );
|
||||||
//fab.setVisibility(View.GONE);
|
//fab.setVisibility(View.GONE);
|
||||||
@@ -499,6 +513,9 @@ public class StoreListActivity extends AppCompatActivity implements GoogleApiCli
|
|||||||
|
|
||||||
if (storelist.size() > 0) {
|
if (storelist.size() > 0) {
|
||||||
//list.setAdapter(new MyAdaptor());
|
//list.setAdapter(new MyAdaptor());
|
||||||
|
StatusCompare ratingCompare = new StatusCompare();
|
||||||
|
Collections.sort(storelist, ratingCompare);
|
||||||
|
|
||||||
adapter = new StoreListActivity.ValueAdapter(getApplicationContext(), storelist);
|
adapter = new StoreListActivity.ValueAdapter(getApplicationContext(), storelist);
|
||||||
recyclerView.setAdapter(adapter);
|
recyclerView.setAdapter(adapter);
|
||||||
recyclerView.setLayoutManager(new LinearLayoutManager(this));
|
recyclerView.setLayoutManager(new LinearLayoutManager(this));
|
||||||
@@ -785,13 +802,13 @@ public class StoreListActivity extends AppCompatActivity implements GoogleApiCli
|
|||||||
// showMyDialog(store_id, current.getSTORE_NAME(), "Yes", current.getVISIT_DATE(), current.getCHECKOUT_STATUS());
|
// showMyDialog(store_id, current.getSTORE_NAME(), "Yes", current.getVISIT_DATE(), current.getCHECKOUT_STATUS());
|
||||||
|
|
||||||
if(checkotherCheckedIn(store_flag_str)){
|
if(checkotherCheckedIn(store_flag_str)){
|
||||||
String from;
|
/*String from;
|
||||||
if (store_flag_str.equals(CommonString.FROM_JCP)) {
|
if (store_flag_str.equals(CommonString.FROM_JCP)) {
|
||||||
from = getString(R.string.adhoc);
|
from = getString(R.string.adhoc);
|
||||||
}else {
|
}else {
|
||||||
from = getString(R.string.jcp);
|
from = getString(R.string.jcp);
|
||||||
}
|
}*/
|
||||||
Snackbar.make(v, getString(R.string.title_store_list_checkout_current) + " - " + from, Snackbar.LENGTH_SHORT).setAction("Action", null).show();
|
Snackbar.make(v, getString(R.string.title_store_list_checkout_current) + " - " + from_checkedIn, Snackbar.LENGTH_SHORT).setAction("Action", null).show();
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
if (!setcheckedmenthod(store_id)) {
|
if (!setcheckedmenthod(store_id)) {
|
||||||
@@ -814,7 +831,9 @@ public class StoreListActivity extends AppCompatActivity implements GoogleApiCli
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (enteryflag) {
|
if (enteryflag) {
|
||||||
if(store_flag_str.equals(CommonString.FROM_JCP)){
|
if(store_flag_str.equals(CommonString.FROM_PHARMA) && coverageObj.getStatus()!=null && coverageObj.getStatus().equalsIgnoreCase(CommonString.KEY_VALID)){
|
||||||
|
Snackbar.make(v, R.string.title_store_list_checkout_Already_filled, Snackbar.LENGTH_SHORT).setAction("Action", null).show();
|
||||||
|
}else if(store_flag_str.equals(CommonString.FROM_JCP) || store_flag_str.equals(CommonString.FROM_ADDITIONAL) || store_flag_str.equals(CommonString.FROM_PHARMA)){
|
||||||
showMyDialog(store_id, current.getSTORE_NAME(), "Yes", current.getVISIT_DATE(), current.getCHECKOUT_STATUS(), current.getGEO_TAG(), current);
|
showMyDialog(store_id, current.getSTORE_NAME(), "Yes", current.getVISIT_DATE(), current.getCHECKOUT_STATUS(), current.getGEO_TAG(), current);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
@@ -887,7 +906,7 @@ public class StoreListActivity extends AppCompatActivity implements GoogleApiCli
|
|||||||
}else{
|
}else{
|
||||||
|
|
||||||
String msg = getString(R.string.you_need_to_be_in_the_store) + "\n " + getString(R.string.distance_from_the_store)+ " - " + distance + " "+getString(R.string.meters);
|
String msg = getString(R.string.you_need_to_be_in_the_store) + "\n " + getString(R.string.distance_from_the_store)+ " - " + distance + " "+getString(R.string.meters);
|
||||||
dialog.cancel();
|
//dialog.cancel();
|
||||||
AlertDialog.Builder builder = new AlertDialog.Builder(StoreListActivity.this);
|
AlertDialog.Builder builder = new AlertDialog.Builder(StoreListActivity.this);
|
||||||
builder.setTitle(getResources().getString(R.string.dialog_title));
|
builder.setTitle(getResources().getString(R.string.dialog_title));
|
||||||
builder.setMessage(msg).setCancelable(false)
|
builder.setMessage(msg).setCancelable(false)
|
||||||
@@ -979,19 +998,25 @@ public class StoreListActivity extends AppCompatActivity implements GoogleApiCli
|
|||||||
public void onClick(DialogInterface dialog, int id) {
|
public void onClick(DialogInterface dialog, int id) {
|
||||||
|
|
||||||
boolean coaching_visit_flag=false;
|
boolean coaching_visit_flag=false;
|
||||||
//Enable disable According to Configuration
|
|
||||||
ArrayList<ConfigurationMasterGetterSetter> configurationData = db.getConfigurationMasterData(country_id);
|
|
||||||
if(configurationData.size()>0){
|
|
||||||
|
|
||||||
for(int i=0; i<configurationData.size();i++){
|
//Coaching visit will be not visible from Additional Stores - Egypt
|
||||||
if(configurationData.get(i).getCONFIGURE().get(0).equalsIgnoreCase("COACHING VISIT") &&
|
if(!store_flag_str.equalsIgnoreCase(CommonString.FROM_ADDITIONAL)){
|
||||||
configurationData.get(i).getACTIVE().get(0).equalsIgnoreCase("1")){
|
|
||||||
coaching_visit_flag = true;
|
//Enable disable According to Configuration
|
||||||
break;
|
ArrayList<ConfigurationMasterGetterSetter> configurationData = db.getConfigurationMasterData(country_id);
|
||||||
|
if(configurationData.size()>0){
|
||||||
|
|
||||||
|
for(int i=0; i<configurationData.size();i++){
|
||||||
|
if(configurationData.get(i).getCONFIGURE().get(0).equalsIgnoreCase("COACHING VISIT") &&
|
||||||
|
configurationData.get(i).getACTIVE().get(0).equalsIgnoreCase("1")){
|
||||||
|
coaching_visit_flag = true;
|
||||||
|
break;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//show Coaching visit
|
||||||
if(coaching_visit_flag){
|
if(coaching_visit_flag){
|
||||||
Intent intent = new Intent(StoreListActivity.this, CoachingVisitActivity.class);
|
Intent intent = new Intent(StoreListActivity.this, CoachingVisitActivity.class);
|
||||||
intent.putExtra(CommonString.KEY_STORE_FLAG, store_flag_str);
|
intent.putExtra(CommonString.KEY_STORE_FLAG, store_flag_str);
|
||||||
@@ -1159,10 +1184,19 @@ public class StoreListActivity extends AppCompatActivity implements GoogleApiCli
|
|||||||
overridePendingTransition(R.anim.activity_in, R.anim.activity_out);
|
overridePendingTransition(R.anim.activity_in, R.anim.activity_out);
|
||||||
dialog.cancel();
|
dialog.cancel();
|
||||||
} else {
|
} else {
|
||||||
Intent in = new Intent(StoreListActivity.this, StoreWisePerformanceActivity.class);
|
|
||||||
startActivity(in);
|
if(store_flag_str.equals(CommonString.FROM_PHARMA)){
|
||||||
overridePendingTransition(R.anim.activity_in, R.anim.activity_out);
|
Intent in = new Intent(StoreListActivity.this, PharmaActivity.class);
|
||||||
dialog.cancel();
|
startActivity(in);
|
||||||
|
overridePendingTransition(R.anim.activity_in, R.anim.activity_out);
|
||||||
|
dialog.cancel();
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
Intent in = new Intent(StoreListActivity.this, StoreWisePerformanceActivity.class);
|
||||||
|
startActivity(in);
|
||||||
|
overridePendingTransition(R.anim.activity_in, R.anim.activity_out);
|
||||||
|
dialog.cancel();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}else{
|
}else{
|
||||||
@@ -1195,6 +1229,24 @@ public class StoreListActivity extends AppCompatActivity implements GoogleApiCli
|
|||||||
new DialogInterface.OnClickListener() {
|
new DialogInterface.OnClickListener() {
|
||||||
public void onClick(DialogInterface dialog1,
|
public void onClick(DialogInterface dialog1,
|
||||||
int id) {
|
int id) {
|
||||||
|
|
||||||
|
editor = preferences.edit();
|
||||||
|
editor.putString(CommonString.KEY_STORE_ID, current.getSTORE_ID());
|
||||||
|
editor.putString(CommonString.KEY_STORE_NAME, current.getSTORE_NAME());
|
||||||
|
editor.putString(CommonString.KEY_VISIT_DATE, current.getVISIT_DATE());
|
||||||
|
editor.putString(CommonString.KEY_CAMERA_ALLOW, current.getCAMERA_ALLOW());
|
||||||
|
editor.putString(CommonString.KEY_CHECKOUT_STATUS, current.getCHECKOUT_STATUS());
|
||||||
|
editor.putString(CommonString.KEY_CLASS_ID, current.getCLASS_ID());
|
||||||
|
editor.putString(CommonString.KEY_EMP_ID, current.getEMP_ID());
|
||||||
|
editor.putString(CommonString.KEY_GEO_TAG, current.getGEO_TAG());
|
||||||
|
editor.putString(CommonString.KEY_KEYACCOUNT_ID, current.getKEYACCOUNT_ID());
|
||||||
|
editor.putString(CommonString.KEY_STORETYPE_ID, current.getSTORETYPE_ID());
|
||||||
|
editor.putString(CommonString.KEY_POG_TYPE_ID, current.getPOG_TYPE_ID());
|
||||||
|
editor.putString(CommonString.KEY_UPLOAD_STATUS, current.getUPLOAD_STATUS());
|
||||||
|
editor.putString(CommonString.KEY_STORE_FLAG, store_flag_str);
|
||||||
|
|
||||||
|
editor.commit();
|
||||||
|
|
||||||
Intent in = new Intent(StoreListActivity.this, GeoTagActivity.class);
|
Intent in = new Intent(StoreListActivity.this, GeoTagActivity.class);
|
||||||
in.putExtra(CommonString.KEY_STORE_FLAG, store_flag_str);
|
in.putExtra(CommonString.KEY_STORE_FLAG, store_flag_str);
|
||||||
in.putExtra(CommonString.KEY_STORE_ID, current.getSTORE_ID());
|
in.putExtra(CommonString.KEY_STORE_ID, current.getSTORE_ID());
|
||||||
@@ -1218,7 +1270,7 @@ public class StoreListActivity extends AppCompatActivity implements GoogleApiCli
|
|||||||
GSKOrangeDB db = new GSKOrangeDB(StoreListActivity.this);
|
GSKOrangeDB db = new GSKOrangeDB(StoreListActivity.this);
|
||||||
db.open();
|
db.open();
|
||||||
|
|
||||||
coverage = db.getCoverageWithStoreID_Data(current.getSTORE_ID());
|
coverage = db.getCoverageWithStoreID_Data(current.getSTORE_ID(), visitDate);
|
||||||
|
|
||||||
if (coverage.size() > 0) {
|
if (coverage.size() > 0) {
|
||||||
|
|
||||||
@@ -1235,7 +1287,7 @@ public class StoreListActivity extends AppCompatActivity implements GoogleApiCli
|
|||||||
|
|
||||||
Intent in = new Intent(StoreListActivity.this, NonWorkingReason.class);
|
Intent in = new Intent(StoreListActivity.this, NonWorkingReason.class);
|
||||||
in.putExtra(CommonString.KEY_STORE_ID, current.getSTORE_ID());
|
in.putExtra(CommonString.KEY_STORE_ID, current.getSTORE_ID());
|
||||||
in.putExtra(CommonString.KEY_STORE_FLAG, CommonString.FROM_JCP);
|
in.putExtra(CommonString.KEY_STORE_FLAG, store_flag_str);
|
||||||
startActivity(in);
|
startActivity(in);
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -1255,7 +1307,7 @@ public class StoreListActivity extends AppCompatActivity implements GoogleApiCli
|
|||||||
} else {
|
} else {
|
||||||
Intent in = new Intent(StoreListActivity.this, NonWorkingReason.class);
|
Intent in = new Intent(StoreListActivity.this, NonWorkingReason.class);
|
||||||
in.putExtra(CommonString.KEY_STORE_ID, current.getSTORE_ID());
|
in.putExtra(CommonString.KEY_STORE_ID, current.getSTORE_ID());
|
||||||
in.putExtra(CommonString.KEY_STORE_FLAG, CommonString.FROM_JCP);
|
in.putExtra(CommonString.KEY_STORE_FLAG, store_flag_str);
|
||||||
startActivity(in);
|
startActivity(in);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1263,7 +1315,7 @@ public class StoreListActivity extends AppCompatActivity implements GoogleApiCli
|
|||||||
|
|
||||||
Intent in = new Intent(StoreListActivity.this, NonWorkingReason.class);
|
Intent in = new Intent(StoreListActivity.this, NonWorkingReason.class);
|
||||||
in.putExtra(CommonString.KEY_STORE_ID, current.getSTORE_ID());
|
in.putExtra(CommonString.KEY_STORE_ID, current.getSTORE_ID());
|
||||||
in.putExtra(CommonString.KEY_STORE_FLAG, CommonString.FROM_JCP);
|
in.putExtra(CommonString.KEY_STORE_FLAG, store_flag_str);
|
||||||
startActivity(in);
|
startActivity(in);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1325,7 +1377,9 @@ public class StoreListActivity extends AppCompatActivity implements GoogleApiCli
|
|||||||
}
|
}
|
||||||
|
|
||||||
void cancelStore(final StoreBean current) {
|
void cancelStore(final StoreBean current) {
|
||||||
if (coverage.get(0).getStatus().equals(CommonString.KEY_INVALID) || coverage.get(0).getStatus().equals(CommonString.KEY_VALID)) {
|
|
||||||
|
CoverageBean coverageData = db.getCoverageSpecificData(date, current.getSTORE_ID());
|
||||||
|
if (coverageData.getStatus().equals(CommonString.KEY_INVALID) || coverageData.getStatus().equals(CommonString.KEY_VALID)) {
|
||||||
AlertDialog.Builder builder = new AlertDialog.Builder(StoreListActivity.this);
|
AlertDialog.Builder builder = new AlertDialog.Builder(StoreListActivity.this);
|
||||||
builder.setMessage(R.string.DELETE_ALERT_MESSAGE)
|
builder.setMessage(R.string.DELETE_ALERT_MESSAGE)
|
||||||
.setCancelable(false)
|
.setCancelable(false)
|
||||||
@@ -1369,24 +1423,77 @@ public class StoreListActivity extends AppCompatActivity implements GoogleApiCli
|
|||||||
ArrayList<CoverageBean> other_coverage_list;
|
ArrayList<CoverageBean> other_coverage_list;
|
||||||
|
|
||||||
if(store_flag_str.equals(CommonString.FROM_JCP)){
|
if(store_flag_str.equals(CommonString.FROM_JCP)){
|
||||||
other_coverage_list = db.getCoverageData(date,CommonString.FROM_DEVIATION );
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
|
|
||||||
other_coverage_list = db.getCoverageData(date,CommonString.FROM_JCP );
|
if(isCheckedInFromStoreFlag(CommonString.FROM_DEVIATION)){
|
||||||
|
from_checkedIn = getString(R.string.adhoc);
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
else if(isCheckedInFromStoreFlag(CommonString.FROM_ADDITIONAL)){
|
||||||
|
from_checkedIn = getString(R.string.additional_stores);
|
||||||
|
return true;
|
||||||
|
}else if(isCheckedInFromStoreFlag(CommonString.FROM_PHARMA)){
|
||||||
|
from_checkedIn = getString(R.string.pharma_stores);
|
||||||
|
return true;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
else if(store_flag_str.equals(CommonString.FROM_ADDITIONAL)){
|
||||||
|
|
||||||
for(int i=0; i<other_coverage_list.size();i++){
|
if(isCheckedInFromStoreFlag(CommonString.FROM_JCP)){
|
||||||
if(other_coverage_list.get(i).getStatus().equalsIgnoreCase(CommonString.KEY_INVALID) ||
|
from_checkedIn = getString(R.string.jcp);
|
||||||
other_coverage_list.get(i).getStatus().equalsIgnoreCase(CommonString.KEY_VALID)){
|
return true;
|
||||||
flag_checked_in = true;
|
}
|
||||||
break;
|
else if(isCheckedInFromStoreFlag(CommonString.FROM_DEVIATION)){
|
||||||
|
from_checkedIn = getString(R.string.adhoc);
|
||||||
|
return true;
|
||||||
|
}else if(isCheckedInFromStoreFlag(CommonString.FROM_PHARMA)){
|
||||||
|
from_checkedIn = getString(R.string.pharma_stores);
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}else if(store_flag_str.equals(CommonString.FROM_PHARMA)){
|
||||||
|
|
||||||
|
if(isCheckedInFromStoreFlag(CommonString.FROM_JCP)){
|
||||||
|
from_checkedIn = getString(R.string.jcp);
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
else if(isCheckedInFromStoreFlag(CommonString.FROM_DEVIATION)){
|
||||||
|
from_checkedIn = getString(R.string.adhoc);
|
||||||
|
return true;
|
||||||
|
}else if(isCheckedInFromStoreFlag(CommonString.FROM_ADDITIONAL)){
|
||||||
|
from_checkedIn = getString(R.string.additional_stores);
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}else {
|
||||||
|
if(isCheckedInFromStoreFlag(CommonString.FROM_JCP)){
|
||||||
|
from_checkedIn = getString(R.string.jcp);
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
else if(isCheckedInFromStoreFlag(CommonString.FROM_ADDITIONAL)){
|
||||||
|
from_checkedIn = getString(R.string.additional_stores);
|
||||||
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return flag_checked_in;
|
return flag_checked_in;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
boolean isCheckedInFromStoreFlag(String flagFromStore){
|
||||||
|
boolean flag = false;
|
||||||
|
|
||||||
|
ArrayList<CoverageBean> other_coverage_list;
|
||||||
|
|
||||||
|
other_coverage_list = db.getCoverageData(date, flagFromStore);
|
||||||
|
|
||||||
|
for(int i=0; i<other_coverage_list.size();i++){
|
||||||
|
if(other_coverage_list.get(i).getStatus().equalsIgnoreCase(CommonString.KEY_INVALID) ||
|
||||||
|
other_coverage_list.get(i).getStatus().equalsIgnoreCase(CommonString.KEY_VALID)){
|
||||||
|
flag = true;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return flag;
|
||||||
|
}
|
||||||
|
|
||||||
class Data {
|
class Data {
|
||||||
int value;
|
int value;
|
||||||
String name;
|
String name;
|
||||||
|
|||||||
@@ -76,6 +76,7 @@ import cpm.com.gskmtorange.R;
|
|||||||
import cpm.com.gskmtorange.constant.CommonFunctions;
|
import cpm.com.gskmtorange.constant.CommonFunctions;
|
||||||
import cpm.com.gskmtorange.constant.CommonString;
|
import cpm.com.gskmtorange.constant.CommonString;
|
||||||
import cpm.com.gskmtorange.gsk_dailyentry.StoreWisePerformanceActivity;
|
import cpm.com.gskmtorange.gsk_dailyentry.StoreWisePerformanceActivity;
|
||||||
|
import cpm.com.gskmtorange.pharma_stores.PharmaActivity;
|
||||||
import cpm.com.gskmtorange.xmlGetterSetter.FailureGetterSetter;
|
import cpm.com.gskmtorange.xmlGetterSetter.FailureGetterSetter;
|
||||||
import cpm.com.gskmtorange.xmlHandlers.FailureXMLHandler;
|
import cpm.com.gskmtorange.xmlHandlers.FailureXMLHandler;
|
||||||
|
|
||||||
@@ -502,7 +503,8 @@ public class StoreimageActivity extends AppCompatActivity implements View.OnClic
|
|||||||
|
|
||||||
String status;
|
String status;
|
||||||
|
|
||||||
if (store_flag_str.equals(CommonString.FROM_JCP) || country_id.equalsIgnoreCase("5")) {
|
if (store_flag_str.equals(CommonString.FROM_JCP) || country_id.equalsIgnoreCase("5")
|
||||||
|
|| store_flag_str.equals(CommonString.FROM_ADDITIONAL) || store_flag_str.equals(CommonString.FROM_PHARMA)) {
|
||||||
status = CommonString.KEY_INVALID;
|
status = CommonString.KEY_INVALID;
|
||||||
} else {
|
} else {
|
||||||
status = CommonString.KEY_VALID;
|
status = CommonString.KEY_VALID;
|
||||||
@@ -531,7 +533,11 @@ public class StoreimageActivity extends AppCompatActivity implements View.OnClic
|
|||||||
String table;
|
String table;
|
||||||
if (store_flag_str.equals(CommonString.FROM_JCP)) {
|
if (store_flag_str.equals(CommonString.FROM_JCP)) {
|
||||||
table = CommonString.KEY_JOURNEY_PLAN;
|
table = CommonString.KEY_JOURNEY_PLAN;
|
||||||
} else {
|
} else if (store_flag_str.equals(CommonString.FROM_ADDITIONAL)) {
|
||||||
|
table = CommonString.KEY_JOURNEY_PLAN_ADDITIONAL;
|
||||||
|
} else if (store_flag_str.equals(CommonString.FROM_PHARMA)) {
|
||||||
|
table = CommonString.KEY_JOURNEY_PLAN_PHARMA;
|
||||||
|
} else{
|
||||||
table = CommonString.KEY_ADHOC_JOURNEY_PLAN;
|
table = CommonString.KEY_ADHOC_JOURNEY_PLAN;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -546,7 +552,7 @@ public class StoreimageActivity extends AppCompatActivity implements View.OnClic
|
|||||||
|
|
||||||
|
|
||||||
//Intent in = new Intent(StoreimageActivity.this, CategoryListActivity.class);
|
//Intent in = new Intent(StoreimageActivity.this, CategoryListActivity.class);
|
||||||
new StoreimageActivity.GeoTagUpload(StoreimageActivity.this).execute();
|
new GeoTagUpload(StoreimageActivity.this).execute();
|
||||||
|
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
@@ -752,7 +758,7 @@ public class StoreimageActivity extends AppCompatActivity implements View.OnClic
|
|||||||
GSKOrangeDB db = new GSKOrangeDB(StoreimageActivity.this);
|
GSKOrangeDB db = new GSKOrangeDB(StoreimageActivity.this);
|
||||||
db.open();
|
db.open();
|
||||||
|
|
||||||
coverage = db.getCoverageWithStoreID_Data(store_id);
|
coverage = db.getCoverageWithStoreID_Data(store_id, visit_date);
|
||||||
|
|
||||||
// uploading Geotag
|
// uploading Geotag
|
||||||
|
|
||||||
@@ -760,49 +766,61 @@ public class StoreimageActivity extends AppCompatActivity implements View.OnClic
|
|||||||
SAXParser saxP = saxPF.newSAXParser();
|
SAXParser saxP = saxPF.newSAXParser();
|
||||||
XMLReader xmlR = saxP.getXMLReader();
|
XMLReader xmlR = saxP.getXMLReader();
|
||||||
|
|
||||||
|
String service;
|
||||||
|
|
||||||
|
if(coverage.get(0).getFlag_from().equals(CommonString.FROM_ADDITIONAL)){
|
||||||
|
service = CommonString.METHOD_UPLOAD_CURRENT_DATA_ADDITIONAL;
|
||||||
|
}
|
||||||
|
else if(coverage.get(0).getFlag_from().equals(CommonString.FROM_PHARMA)){
|
||||||
|
service = CommonString.METHOD_UPLOAD_CURRENT_DATA_PHARMA;
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
service = CommonString.METHOD_UPLOAD_CURRENT_DATA;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
String current_xml = "";
|
String current_xml = "";
|
||||||
|
|
||||||
if (coverage.size() > 0) {
|
if (coverage.size() > 0) {
|
||||||
|
|
||||||
for (int i = 0; i < coverage.size(); i++) {
|
//for (int i = 0; i < coverage.size(); i++) {
|
||||||
|
|
||||||
|
|
||||||
String onXML = "[Coverage_Intime][USER_ID]"
|
String onXML = "[Coverage_Intime][USER_ID]"
|
||||||
+ _UserId
|
+ _UserId
|
||||||
+ "[/USER_ID]"
|
+ "[/USER_ID]"
|
||||||
+ "[STORE_ID]"
|
+ "[STORE_ID]"
|
||||||
+ coverage.get(i).getStoreId()
|
+ coverage.get(0).getStoreId()
|
||||||
+ "[/STORE_ID]"
|
+ "[/STORE_ID]"
|
||||||
+ "[VISIT_DATE]"
|
+ "[VISIT_DATE]"
|
||||||
+ coverage.get(i).getVisitDate()
|
+ coverage.get(0).getVisitDate()
|
||||||
+ "[/VISIT_DATE]"
|
+ "[/VISIT_DATE]"
|
||||||
+ "[IN_TIME]"
|
+ "[IN_TIME]"
|
||||||
+ coverage.get(i).getInTime()
|
+ coverage.get(0).getInTime()
|
||||||
+ "[/IN_TIME]"
|
+ "[/IN_TIME]"
|
||||||
+ "[LATITUDE]"
|
+ "[LATITUDE]"
|
||||||
+ coverage.get(i).getLatitude()
|
+ coverage.get(0).getLatitude()
|
||||||
+ "[/LATITUDE]"
|
+ "[/LATITUDE]"
|
||||||
+ "[LONGITUDE ]"
|
+ "[LONGITUDE ]"
|
||||||
+ coverage.get(i).getLongitude()
|
+ coverage.get(0).getLongitude()
|
||||||
+ "[/LONGITUDE ]"
|
+ "[/LONGITUDE ]"
|
||||||
+ "[REASON_ID]"
|
+ "[REASON_ID]"
|
||||||
+ coverage.get(i).getReasonid()
|
+ coverage.get(0).getReasonid()
|
||||||
+ "[/REASON_ID]"
|
+ "[/REASON_ID]"
|
||||||
+ "[REMARK]"
|
+ "[REMARK]"
|
||||||
+ coverage.get(i).getReason()
|
+ coverage.get(0).getReason()
|
||||||
+ "[/REMARK][/Coverage_Intime]";
|
+ "[/REMARK][/Coverage_Intime]";
|
||||||
|
|
||||||
current_xml = current_xml + onXML;
|
//current_xml = current_xml + onXML;
|
||||||
|
|
||||||
|
|
||||||
}
|
//}
|
||||||
|
|
||||||
current_xml = "[DATA]" + current_xml
|
current_xml = "[DATA]" + onXML
|
||||||
+ "[/DATA]";
|
+ "[/DATA]";
|
||||||
|
|
||||||
SoapObject request = new SoapObject(CommonString.NAMESPACE,
|
SoapObject request = new SoapObject(CommonString.NAMESPACE,
|
||||||
CommonString.METHOD_UPLOAD_CURRENT_DATA);
|
service);
|
||||||
//request.addProperty("MID", "0");
|
//request.addProperty("MID", "0");
|
||||||
// request.addProperty("KEYS", "CURRENT_DATA");
|
// request.addProperty("KEYS", "CURRENT_DATA");
|
||||||
// request.addProperty("USERNAME", username);
|
// request.addProperty("USERNAME", username);
|
||||||
@@ -817,7 +835,7 @@ public class StoreimageActivity extends AppCompatActivity implements View.OnClic
|
|||||||
HttpTransportSE androidHttpTransport = new HttpTransportSE(
|
HttpTransportSE androidHttpTransport = new HttpTransportSE(
|
||||||
CommonString.URL);
|
CommonString.URL);
|
||||||
androidHttpTransport.call(
|
androidHttpTransport.call(
|
||||||
CommonString.SOAP_ACTION_UPLOAD_CURRRENT_DATA, envelope);
|
CommonString.SOAP_ACTION + service, envelope);
|
||||||
Object result = (Object) envelope.getResponse();
|
Object result = (Object) envelope.getResponse();
|
||||||
|
|
||||||
if (result.toString().equalsIgnoreCase(
|
if (result.toString().equalsIgnoreCase(
|
||||||
@@ -828,7 +846,7 @@ public class StoreimageActivity extends AppCompatActivity implements View.OnClic
|
|||||||
|
|
||||||
if (result.toString().equalsIgnoreCase(
|
if (result.toString().equalsIgnoreCase(
|
||||||
CommonString.KEY_FALSE)) {
|
CommonString.KEY_FALSE)) {
|
||||||
return CommonString.METHOD_UPLOAD_CURRENT_DATA;
|
return service;
|
||||||
}
|
}
|
||||||
|
|
||||||
// for failure
|
// for failure
|
||||||
@@ -917,12 +935,17 @@ public class StoreimageActivity extends AppCompatActivity implements View.OnClic
|
|||||||
if (result.equalsIgnoreCase(CommonString.KEY_SUCCESS)) {
|
if (result.equalsIgnoreCase(CommonString.KEY_SUCCESS)) {
|
||||||
dialog.dismiss();
|
dialog.dismiss();
|
||||||
|
|
||||||
if (store_flag_str.equals(CommonString.FROM_JCP)|| country_id.equalsIgnoreCase("5")) {
|
if (store_flag_str.equals(CommonString.FROM_JCP)|| country_id.equalsIgnoreCase("5")|| store_flag_str.equals(CommonString.FROM_ADDITIONAL)) {
|
||||||
Intent in = new Intent(StoreimageActivity.this, StoreWisePerformanceActivity.class);
|
Intent in = new Intent(StoreimageActivity.this, StoreWisePerformanceActivity.class);
|
||||||
startActivity(in);
|
startActivity(in);
|
||||||
finish();
|
finish();
|
||||||
overridePendingTransition(R.anim.activity_in, R.anim.activity_out);
|
overridePendingTransition(R.anim.activity_in, R.anim.activity_out);
|
||||||
} else {
|
} else if (store_flag_str.equals(CommonString.FROM_PHARMA)) {
|
||||||
|
Intent in = new Intent(StoreimageActivity.this, PharmaActivity.class);
|
||||||
|
startActivity(in);
|
||||||
|
finish();
|
||||||
|
overridePendingTransition(R.anim.activity_in, R.anim.activity_out);
|
||||||
|
} else{
|
||||||
finish();
|
finish();
|
||||||
overridePendingTransition(R.anim.activity_back_in, R.anim.activity_back_out);
|
overridePendingTransition(R.anim.activity_back_in, R.anim.activity_back_out);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -57,6 +57,8 @@ import cpm.com.gskmtorange.xmlGetterSetter.MAPPING_PLANOGRAM_MasterGetterSetter;
|
|||||||
import cpm.com.gskmtorange.xmlGetterSetter.MAPPING_SOS_TARGET_MasterGetterSetter;
|
import cpm.com.gskmtorange.xmlGetterSetter.MAPPING_SOS_TARGET_MasterGetterSetter;
|
||||||
import cpm.com.gskmtorange.xmlGetterSetter.MappingCategoryImageAllowGetterSetter;
|
import cpm.com.gskmtorange.xmlGetterSetter.MappingCategoryImageAllowGetterSetter;
|
||||||
import cpm.com.gskmtorange.xmlGetterSetter.MappingDisplayChecklistGetterSetter;
|
import cpm.com.gskmtorange.xmlGetterSetter.MappingDisplayChecklistGetterSetter;
|
||||||
|
import cpm.com.gskmtorange.xmlGetterSetter.MappingPharmaMSLGetterSetter;
|
||||||
|
import cpm.com.gskmtorange.xmlGetterSetter.MappingPharmaQuestionGetterSetter;
|
||||||
import cpm.com.gskmtorange.xmlGetterSetter.MappingPlanogramCountrywiseGetterSetter;
|
import cpm.com.gskmtorange.xmlGetterSetter.MappingPlanogramCountrywiseGetterSetter;
|
||||||
import cpm.com.gskmtorange.xmlGetterSetter.MappingPlanogramStorewiseGetterSetter;
|
import cpm.com.gskmtorange.xmlGetterSetter.MappingPlanogramStorewiseGetterSetter;
|
||||||
import cpm.com.gskmtorange.xmlGetterSetter.MappingPromotionGetterSetter;
|
import cpm.com.gskmtorange.xmlGetterSetter.MappingPromotionGetterSetter;
|
||||||
@@ -119,6 +121,12 @@ public class DownloadActivity extends AppCompatActivity {
|
|||||||
|
|
||||||
MappingPlanogramStorewiseGetterSetter mappingPlanogramStorewiseGetterSetter;
|
MappingPlanogramStorewiseGetterSetter mappingPlanogramStorewiseGetterSetter;
|
||||||
|
|
||||||
|
JourneyPlanGetterSetter additionalJcpGetterSetter;
|
||||||
|
MappingStockGetterSetter mappingStockAdditionalGetterSetter;
|
||||||
|
JourneyPlanGetterSetter pharmaJcpGetterSetter;
|
||||||
|
MappingPharmaQuestionGetterSetter mappingPharmaQuestionGetterSetter;
|
||||||
|
MappingPharmaMSLGetterSetter mappingPharmaMSLGetterSetter;
|
||||||
|
|
||||||
private Dialog dialog;
|
private Dialog dialog;
|
||||||
private ProgressBar pb;
|
private ProgressBar pb;
|
||||||
private TextView percentage, message;
|
private TextView percentage, message;
|
||||||
@@ -179,7 +187,7 @@ public class DownloadActivity extends AppCompatActivity {
|
|||||||
protected String doInBackground(Void... voids) {
|
protected String doInBackground(Void... voids) {
|
||||||
try {
|
try {
|
||||||
|
|
||||||
boolean no_jcp_flag = false;
|
boolean no_jcp_flag = false, no_adhoc_flag = false;
|
||||||
|
|
||||||
String resultHttp = "";
|
String resultHttp = "";
|
||||||
data = new Data();
|
data = new Data();
|
||||||
@@ -268,13 +276,49 @@ public class DownloadActivity extends AppCompatActivity {
|
|||||||
data.value = 15;
|
data.value = 15;
|
||||||
data.name = "ADHOC JOURNEYPLAN " + getResources().getString(R.string.download_data);
|
data.name = "ADHOC JOURNEYPLAN " + getResources().getString(R.string.download_data);
|
||||||
} else {
|
} else {
|
||||||
if (no_jcp_flag) {
|
no_adhoc_flag = true;
|
||||||
|
/*if (no_jcp_flag) {
|
||||||
return "JOURNEY_PLAN";
|
return "JOURNEY_PLAN";
|
||||||
}
|
}*/
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
publishProgress(data);
|
publishProgress(data);
|
||||||
|
|
||||||
|
//JOURNEY_PLAN_ADDITIONAL
|
||||||
|
request = new SoapObject(CommonString.NAMESPACE, CommonString.METHOD_NAME_UNIVERSAL_DOWNLOAD);
|
||||||
|
request.addProperty("UserName", userId);
|
||||||
|
request.addProperty("Type", "JOURNEY_PLAN_ADDITIONAL");
|
||||||
|
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();
|
||||||
|
additionalJcpGetterSetter = XMLHandlers.JCPXMLHandler(xpp, eventType);
|
||||||
|
|
||||||
|
if (additionalJcpGetterSetter.getSTORE_ID().size() > 0) {
|
||||||
|
resultHttp = CommonString.KEY_SUCCESS;
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
|
||||||
|
if (no_jcp_flag && no_adhoc_flag) {
|
||||||
|
return "JOURNEY_PLAN";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
String additional_jcpTable = additionalJcpGetterSetter.getTable_journey_plan();
|
||||||
|
TableBean.setAdditionalJourneyPlan(additional_jcpTable);
|
||||||
|
}
|
||||||
|
|
||||||
//GEO_FENCING
|
//GEO_FENCING
|
||||||
request = new SoapObject(CommonString.NAMESPACE, CommonString.METHOD_NAME_UNIVERSAL_DOWNLOAD);
|
request = new SoapObject(CommonString.NAMESPACE, CommonString.METHOD_NAME_UNIVERSAL_DOWNLOAD);
|
||||||
request.addProperty("UserName", userId);
|
request.addProperty("UserName", userId);
|
||||||
@@ -1385,6 +1429,139 @@ public class DownloadActivity extends AppCompatActivity {
|
|||||||
publishProgress(data);
|
publishProgress(data);
|
||||||
|
|
||||||
|
|
||||||
|
// MAPPING_STOCK_ADDITIONAL
|
||||||
|
request = new SoapObject(CommonString.NAMESPACE, CommonString.METHOD_NAME_UNIVERSAL_DOWNLOAD);
|
||||||
|
request.addProperty("UserName", userId);
|
||||||
|
request.addProperty("Type", "MAPPING_STOCK_ADDITIONAL");
|
||||||
|
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();
|
||||||
|
mappingStockAdditionalGetterSetter = XMLHandlers.mappingStockXMLHandler(xpp, eventType);
|
||||||
|
|
||||||
|
String stocktable = mappingStockAdditionalGetterSetter.getTable_MAPPING_STOCK();
|
||||||
|
if (stocktable != null) {
|
||||||
|
resultHttp = CommonString.KEY_SUCCESS;
|
||||||
|
TableBean.setMappingStockAdditional(stocktable);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (mappingStockAdditionalGetterSetter.getSKU_ID().size() > 0) {
|
||||||
|
data.value = 98;
|
||||||
|
data.name = "MAPPING_STOCK_ADDITIONAL " + getResources().getString(R.string.download_data);
|
||||||
|
} else {
|
||||||
|
// return "MAPPING_STOCK_ADHOC";
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
publishProgress(data);
|
||||||
|
|
||||||
|
|
||||||
|
//JOURNEY_PLAN_PHARMA
|
||||||
|
request = new SoapObject(CommonString.NAMESPACE, CommonString.METHOD_NAME_UNIVERSAL_DOWNLOAD);
|
||||||
|
request.addProperty("UserName", userId);
|
||||||
|
request.addProperty("Type", "JOURNEY_PLAN_PHARMA");
|
||||||
|
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();
|
||||||
|
pharmaJcpGetterSetter = XMLHandlers.JCPXMLHandler(xpp, eventType);
|
||||||
|
|
||||||
|
if (pharmaJcpGetterSetter.getSTORE_ID().size() > 0) {
|
||||||
|
resultHttp = CommonString.KEY_SUCCESS;
|
||||||
|
}
|
||||||
|
|
||||||
|
String pharma_jcpTable = pharmaJcpGetterSetter.getTable_journey_plan();
|
||||||
|
TableBean.setTable_JOURNEY_PLAN_PHARMA(pharma_jcpTable);
|
||||||
|
}
|
||||||
|
|
||||||
|
//MAPPING_PHARMA_QUESTION
|
||||||
|
request = new SoapObject(CommonString.NAMESPACE, CommonString.METHOD_NAME_UNIVERSAL_DOWNLOAD);
|
||||||
|
request.addProperty("UserName", userId);
|
||||||
|
request.addProperty("Type", "MAPPING_PHARMA_QUESTION");
|
||||||
|
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();
|
||||||
|
mappingPharmaQuestionGetterSetter = XMLHandlers.mappingPharmaQuestionXMLHandler(xpp, eventType);
|
||||||
|
|
||||||
|
if (mappingPharmaQuestionGetterSetter.getQUESTION_ID().size() > 0) {
|
||||||
|
resultHttp = CommonString.KEY_SUCCESS;
|
||||||
|
}
|
||||||
|
|
||||||
|
String mapping_pahrma_question_Table = mappingPharmaQuestionGetterSetter.getTable_MAPPING_PHARMA_QUESTION();
|
||||||
|
TableBean.setTable_MAPPING_PHARMA_QUESTION(mapping_pahrma_question_Table);
|
||||||
|
}
|
||||||
|
|
||||||
|
// MAPPING_PHARMA_MSL
|
||||||
|
request = new SoapObject(CommonString.NAMESPACE, CommonString.METHOD_NAME_UNIVERSAL_DOWNLOAD);
|
||||||
|
request.addProperty("UserName", userId);
|
||||||
|
request.addProperty("Type", "MAPPING_PHARMA_MSL");
|
||||||
|
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();
|
||||||
|
mappingPharmaMSLGetterSetter = XMLHandlers.mappingPharmaMSLXMLHandler(xpp, eventType);
|
||||||
|
|
||||||
|
String stocktable = mappingPharmaMSLGetterSetter.getTable_MAPPING_PHARMA_MSL();
|
||||||
|
if (stocktable != null) {
|
||||||
|
resultHttp = CommonString.KEY_SUCCESS;
|
||||||
|
TableBean.setTable_MAPPING_PHARMA_MSL(stocktable);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (mappingPharmaMSLGetterSetter.getSKU_ID().size() > 0) {
|
||||||
|
data.value = 99;
|
||||||
|
data.name = "MAPPING_PHARMA_MSL " + getResources().getString(R.string.download_data);
|
||||||
|
} else {
|
||||||
|
// return "MAPPING_PHARMA_MSL";
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
publishProgress(data);
|
||||||
|
|
||||||
/* //MAPPING_COUNTRYWISE_PLANOGRAM
|
/* //MAPPING_COUNTRYWISE_PLANOGRAM
|
||||||
request = new SoapObject(CommonString.NAMESPACE, CommonString.METHOD_NAME_UNIVERSAL_DOWNLOAD);
|
request = new SoapObject(CommonString.NAMESPACE, CommonString.METHOD_NAME_UNIVERSAL_DOWNLOAD);
|
||||||
request.addProperty("UserName", userId);
|
request.addProperty("UserName", userId);
|
||||||
@@ -1762,6 +1939,11 @@ public class DownloadActivity extends AppCompatActivity {
|
|||||||
db.InsertCONFIGURATION_MASTER(configurationMasterGetterSetter);
|
db.InsertCONFIGURATION_MASTER(configurationMasterGetterSetter);
|
||||||
db.InsertMappingStockSTOREWISE(mappingStockStorewiseGetterSetter);
|
db.InsertMappingStockSTOREWISE(mappingStockStorewiseGetterSetter);
|
||||||
db.InsertMAPPING_PLANOGRAM_STORE_WISE(mappingPlanogramStorewiseGetterSetter);
|
db.InsertMAPPING_PLANOGRAM_STORE_WISE(mappingPlanogramStorewiseGetterSetter);
|
||||||
|
db.InsertAdditionalJCP(additionalJcpGetterSetter);
|
||||||
|
db.InsertMappingStock(mappingStockAdditionalGetterSetter, "MAPPING_STOCK_ADDITIONAL");
|
||||||
|
db.insertMappingPahrmaQuestion(mappingPharmaQuestionGetterSetter);
|
||||||
|
db.InsertPharmaJCP(pharmaJcpGetterSetter);
|
||||||
|
db.InsertMAPPING_PHARMA_MSL(mappingPharmaMSLGetterSetter);
|
||||||
|
|
||||||
|
|
||||||
} catch (MalformedURLException e) {
|
} catch (MalformedURLException e) {
|
||||||
|
|||||||
@@ -32,6 +32,7 @@ import cpm.com.gskmtorange.constant.CommonFunctions;
|
|||||||
import cpm.com.gskmtorange.constant.CommonString;
|
import cpm.com.gskmtorange.constant.CommonString;
|
||||||
import cpm.com.gskmtorange.xmlGetterSetter.AuditDataGetterSetter;
|
import cpm.com.gskmtorange.xmlGetterSetter.AuditDataGetterSetter;
|
||||||
import cpm.com.gskmtorange.xmlGetterSetter.CategoryGetterSetter;
|
import cpm.com.gskmtorange.xmlGetterSetter.CategoryGetterSetter;
|
||||||
|
import cpm.com.gskmtorange.xmlGetterSetter.MSL_AvailabilityStockFacingGetterSetter;
|
||||||
import cpm.com.gskmtorange.xmlGetterSetter.T2PGetterSetter;
|
import cpm.com.gskmtorange.xmlGetterSetter.T2PGetterSetter;
|
||||||
|
|
||||||
public class CategoryListActivity extends AppCompatActivity {
|
public class CategoryListActivity extends AppCompatActivity {
|
||||||
@@ -104,7 +105,10 @@ public class CategoryListActivity extends AppCompatActivity {
|
|||||||
else if(store_flag_str.equalsIgnoreCase(CommonString.FROM_DEVIATION)){
|
else if(store_flag_str.equalsIgnoreCase(CommonString.FROM_DEVIATION)){
|
||||||
categoryList = db.getCategoryListData(keyAccount_id, storeType_id, class_id, store_id, CommonString.TABLE_MAPPING_STOCK_ADHOC);
|
categoryList = db.getCategoryListData(keyAccount_id, storeType_id, class_id, store_id, CommonString.TABLE_MAPPING_STOCK_ADHOC);
|
||||||
}
|
}
|
||||||
else {
|
else if(store_flag_str.equalsIgnoreCase(CommonString.FROM_ADDITIONAL)){
|
||||||
|
categoryList = db.getCategoryListData(keyAccount_id, storeType_id, class_id, store_id, CommonString.TABLE_MAPPING_STOCK_ADDITIONAL);
|
||||||
|
}
|
||||||
|
else{
|
||||||
categoryList = db.getCategoryListData(keyAccount_id, storeType_id, class_id, store_id, "MAPPING_STOCK");
|
categoryList = db.getCategoryListData(keyAccount_id, storeType_id, class_id, store_id, "MAPPING_STOCK");
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -115,11 +119,24 @@ public class CategoryListActivity extends AppCompatActivity {
|
|||||||
boolean flag_filled = false;
|
boolean flag_filled = false;
|
||||||
String category_id = categoryList.get(i).getCategory_id();
|
String category_id = categoryList.get(i).getCategory_id();
|
||||||
|
|
||||||
//Additional_Visibility
|
if(store_flag_str.equalsIgnoreCase(CommonString.FROM_ADDITIONAL)){
|
||||||
if (db.additionalVisibilitydata(store_id, category_id)) {
|
boolean flag_mapping_stock = db.isMappingStockDataStockFacing(category_id, keyAccount_id, storeType_id, class_id, store_id, CommonString.TABLE_MAPPING_STOCK_ADDITIONAL);
|
||||||
boolean flag = true;
|
|
||||||
|
|
||||||
//MSL_Availability
|
if (flag_mapping_stock) {
|
||||||
|
if (db.checkStockData(store_id, category_id)) {
|
||||||
|
flag_filled = true;
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
flag_filled = false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
//Additional_Visibility
|
||||||
|
if (db.additionalVisibilitydata(store_id, category_id)) {
|
||||||
|
boolean flag = true;
|
||||||
|
|
||||||
|
//MSL_Availability
|
||||||
/*if (db.isMappingStockDataMSL_Availability(category_id, keyAccount_id, storeType_id, class_id)) {
|
/*if (db.isMappingStockDataMSL_Availability(category_id, keyAccount_id, storeType_id, class_id)) {
|
||||||
if (!db.checkMsl_AvailabilityData(store_id, category_id)) {
|
if (!db.checkMsl_AvailabilityData(store_id, category_id)) {
|
||||||
flag = false;
|
flag = false;
|
||||||
@@ -135,110 +152,130 @@ public class CategoryListActivity extends AppCompatActivity {
|
|||||||
}
|
}
|
||||||
}*/
|
}*/
|
||||||
|
|
||||||
boolean flag_mapping_stock;
|
boolean flag_mapping_stock;
|
||||||
//New MSL_Availability_StockFacing
|
//New MSL_Availability_StockFacing
|
||||||
if(country_id.equals("7")){
|
if(country_id.equals("7")){
|
||||||
flag_mapping_stock = db.isMappingStockDataStockFacing(category_id, null, null, null, store_id, CommonString.TABLE_MAPPING_STOCK_STOREWISE);
|
flag_mapping_stock = db.isMappingStockDataStockFacing(category_id, null, null, null, store_id, CommonString.TABLE_MAPPING_STOCK_STOREWISE);
|
||||||
}
|
}
|
||||||
else if(store_flag_str.equalsIgnoreCase(CommonString.FROM_DEVIATION)){
|
else if(store_flag_str.equalsIgnoreCase(CommonString.FROM_DEVIATION)){
|
||||||
flag_mapping_stock = db.isMappingStockDataStockFacing(category_id, keyAccount_id, storeType_id, class_id, store_id, CommonString.TABLE_MAPPING_STOCK_ADHOC);
|
flag_mapping_stock = db.isMappingStockDataStockFacing(category_id, keyAccount_id, storeType_id, class_id, store_id, CommonString.TABLE_MAPPING_STOCK_ADHOC);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
flag_mapping_stock = db.isMappingStockDataStockFacing(category_id, keyAccount_id, storeType_id, class_id, store_id, CommonString.TABLE_MAPPING_STOCK);
|
flag_mapping_stock = db.isMappingStockDataStockFacing(category_id, keyAccount_id, storeType_id, class_id, store_id, CommonString.TABLE_MAPPING_STOCK);
|
||||||
}
|
}
|
||||||
if (flag_mapping_stock) {
|
if (flag_mapping_stock) {
|
||||||
if (!db.checkMsl_Availability_StockFacingData(store_id, category_id)) {
|
if (!db.checkMsl_Availability_StockFacingData(store_id, category_id)) {
|
||||||
flag = false;
|
flag = false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//Promo Compliance
|
//Promo Compliance
|
||||||
if (flag) {
|
if (flag) {
|
||||||
if(country_id.equals("7")){
|
if(country_id.equals("7")){
|
||||||
if(db.getPromoComplianceSkuwiseExistsAfterData(store_id, category_id).size()==0){
|
if(db.getPromoComplianceSkuwiseExistsAfterData(store_id, category_id).size()==0){
|
||||||
flag = false;
|
flag = false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
boolean isMappingPromotion_Flag;
|
boolean isMappingPromotion_Flag;
|
||||||
if(store_flag_str.equalsIgnoreCase(CommonString.FROM_DEVIATION)){
|
if(store_flag_str.equalsIgnoreCase(CommonString.FROM_DEVIATION)){
|
||||||
isMappingPromotion_Flag = db.isMappingPromotionData(store_id, category_id, CommonString.TABLE_MAPPING_PROMOTION_ADHOC);
|
isMappingPromotion_Flag = db.isMappingPromotionData(store_id, category_id, CommonString.TABLE_MAPPING_PROMOTION_ADHOC);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
isMappingPromotion_Flag = db.isMappingPromotionData(store_id, category_id, CommonString.TABLE_MAPPING_PROMOTION);
|
isMappingPromotion_Flag = db.isMappingPromotionData(store_id, category_id, CommonString.TABLE_MAPPING_PROMOTION);
|
||||||
}
|
}
|
||||||
if (isMappingPromotion_Flag) {
|
if (isMappingPromotion_Flag) {
|
||||||
if (!db.checkPromoComplianceData(store_id, category_id)) {
|
if (!db.checkPromoComplianceData(store_id, category_id)) {
|
||||||
flag = false;
|
flag = false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//T2P
|
//T2P
|
||||||
if (flag) {
|
if (flag) {
|
||||||
boolean flag_t2p_mapping;
|
boolean flag_t2p_mapping;
|
||||||
if(store_flag_str.equalsIgnoreCase(CommonString.FROM_DEVIATION)){
|
if(store_flag_str.equalsIgnoreCase(CommonString.FROM_DEVIATION)){
|
||||||
flag_t2p_mapping = db.isMappingT2PData(store_id, category_id,CommonString.TABLE_MAPPING_T2P_ADHOC);
|
flag_t2p_mapping = db.isMappingT2PData(store_id, category_id,CommonString.TABLE_MAPPING_T2P_ADHOC);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
flag_t2p_mapping = db.isMappingT2PData(store_id, category_id,CommonString.TABLE_MAPPING_T2P);
|
flag_t2p_mapping = db.isMappingT2PData(store_id, category_id,CommonString.TABLE_MAPPING_T2P);
|
||||||
}
|
}
|
||||||
if (flag_t2p_mapping) {
|
if (flag_t2p_mapping) {
|
||||||
if (!db.isFilledT2P(store_id, category_id)) {
|
if (!db.isFilledT2P(store_id, category_id)) {
|
||||||
flag = false;
|
flag = false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//Category image
|
//Category image
|
||||||
if (camera_allow.equalsIgnoreCase("1")) {
|
if (camera_allow.equalsIgnoreCase("1")) {
|
||||||
//if (category_camera_list.size()>0) {
|
//if (category_camera_list.size()>0) {
|
||||||
if (!db.isCategoryPictureData(store_id, category_id)) {
|
if (!db.isCategoryPictureData(store_id, category_id)) {
|
||||||
flag = false;
|
flag = false;
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
else {
|
||||||
|
|
||||||
if (flag){
|
final ArrayList<MSL_AvailabilityStockFacingGetterSetter> sub_category_list = db.getSubCategoryMaster(category_id);
|
||||||
|
|
||||||
//changed on 23.10.2018
|
//if Sub Group Data exists for any Sub Category of the Category
|
||||||
//ArrayList<AuditDataGetterSetter> question_list = getAuditAfterDeletion(category_id);
|
boolean isSubGroupDataExists = false;
|
||||||
//changed on 03.12.2018
|
for(int j=0;j<sub_category_list.size();j++){
|
||||||
ArrayList<AuditDataGetterSetter> question_list = getAuditQnsRemoved(category_id);
|
if(db.getSkuGroupMasterData(category_id, sub_category_list.get(j).getSub_category_id()).size()>0){
|
||||||
|
isSubGroupDataExists = true;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if(question_list.size()>0){
|
if(isSubGroupDataExists){
|
||||||
|
if (db.getNoCameraCategoryDataInserted(store_id, category_id, null).size() == 0) {
|
||||||
|
flag = false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if(db.getAfterSaveAuditQuestionAnswerData(store_id, category_id).size() == 0){
|
if (flag){
|
||||||
flag = false;
|
|
||||||
|
|
||||||
}
|
//changed on 23.10.2018
|
||||||
}
|
//ArrayList<AuditDataGetterSetter> question_list = getAuditAfterDeletion(category_id);
|
||||||
}
|
//changed on 03.12.2018
|
||||||
|
ArrayList<AuditDataGetterSetter> question_list = getAuditQnsRemoved(category_id);
|
||||||
|
|
||||||
if(flag){
|
if(question_list.size()>0){
|
||||||
if (db.getSubCategoryMasterForPOG(category_id, storeType_id, pog_type_id, null).size() > 0) {
|
|
||||||
if (db.getAfterSavePOGUploadQuestionAnswerData(store_id, category_id).size() == 0) {
|
|
||||||
flag = false;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (flag){
|
if(db.getAfterSaveAuditQuestionAnswerData(store_id, category_id).size() == 0){
|
||||||
|
flag = false;
|
||||||
|
|
||||||
//Counterfeit Product Option - Egypt
|
}
|
||||||
if(country_id.equals("6")){
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (db.getCounterfeitProductExistsAfterData(store_id, category_id).size() == 0) {
|
if(flag){
|
||||||
flag = false;
|
if (db.getSubCategoryMasterForPOG(category_id, storeType_id, pog_type_id, null).size() > 0) {
|
||||||
}
|
if (db.getAfterSavePOGUploadQuestionAnswerData(store_id, category_id).size() == 0) {
|
||||||
|
flag = false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
}
|
if (flag){
|
||||||
}
|
|
||||||
|
|
||||||
flag_filled = flag;
|
//Counterfeit Product Option - Egypt
|
||||||
}
|
if(country_id.equals("6")){
|
||||||
|
|
||||||
|
if (db.getCounterfeitProductExistsAfterData(store_id, category_id).size() == 0) {
|
||||||
|
flag = false;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
flag_filled = flag;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (flag_filled) {
|
if (flag_filled) {
|
||||||
if (category_id.equals("1")) {
|
if (category_id.equals("1")) {
|
||||||
@@ -481,8 +518,23 @@ public class CategoryListActivity extends AppCompatActivity {
|
|||||||
break;
|
break;
|
||||||
}*/
|
}*/
|
||||||
|
|
||||||
if (db.additionalVisibilitydata(store_id, category_id)) {
|
if(store_flag_str.equalsIgnoreCase(CommonString.FROM_ADDITIONAL)){
|
||||||
//boolean flag = true;
|
boolean flag_mapping_stock = db.isMappingStockDataStockFacing(category_id, keyAccount_id, storeType_id, class_id, store_id, CommonString.TABLE_MAPPING_STOCK_ADDITIONAL);
|
||||||
|
|
||||||
|
if (flag_mapping_stock) {
|
||||||
|
if (db.checkStockData(store_id, category_id)) {
|
||||||
|
flag_filled = true;
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
flag_filled = false;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
if (db.additionalVisibilitydata(store_id, category_id)) {
|
||||||
|
//boolean flag = true;
|
||||||
|
|
||||||
/*if (db.isMappingStockDataMSL_Availability(category_id, keyAccount_id, storeType_id, class_id)) {
|
/*if (db.isMappingStockDataMSL_Availability(category_id, keyAccount_id, storeType_id, class_id)) {
|
||||||
if (!db.checkMsl_AvailabilityData(store_id, category_id)) {
|
if (!db.checkMsl_AvailabilityData(store_id, category_id)) {
|
||||||
@@ -499,98 +551,118 @@ public class CategoryListActivity extends AppCompatActivity {
|
|||||||
}
|
}
|
||||||
}*/
|
}*/
|
||||||
|
|
||||||
boolean flag_mapping_stock;
|
boolean flag_mapping_stock;
|
||||||
//New MSL_Availability_StockFacing
|
//New MSL_Availability_StockFacing
|
||||||
if(country_id.equals("7")){
|
if(country_id.equals("7")){
|
||||||
flag_mapping_stock = db.isMappingStockDataStockFacing(category_id, null, null, null, store_id, CommonString.TABLE_MAPPING_STOCK_STOREWISE);
|
flag_mapping_stock = db.isMappingStockDataStockFacing(category_id, null, null, null, store_id, CommonString.TABLE_MAPPING_STOCK_STOREWISE);
|
||||||
}
|
|
||||||
else if(store_flag_str.equalsIgnoreCase(CommonString.FROM_DEVIATION)){
|
|
||||||
flag_mapping_stock = db.isMappingStockDataStockFacing(category_id, keyAccount_id, storeType_id, class_id, store_id, CommonString.TABLE_MAPPING_STOCK_ADHOC);
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
flag_mapping_stock = db.isMappingStockDataStockFacing(category_id, keyAccount_id, storeType_id, class_id, store_id, CommonString.TABLE_MAPPING_STOCK);
|
|
||||||
}
|
|
||||||
if (flag_mapping_stock) {
|
|
||||||
if (!db.checkMsl_Availability_StockFacingData(store_id, category_id)) {
|
|
||||||
flag_filled = false;
|
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
}
|
else if(store_flag_str.equalsIgnoreCase(CommonString.FROM_DEVIATION)){
|
||||||
|
flag_mapping_stock = db.isMappingStockDataStockFacing(category_id, keyAccount_id, storeType_id, class_id, store_id, CommonString.TABLE_MAPPING_STOCK_ADHOC);
|
||||||
if(country_id.equals("7")){
|
|
||||||
if(db.getPromoComplianceSkuwiseExistsAfterData(store_id, category_id).size()==0){
|
|
||||||
flag_filled = false;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
boolean isMappingPromotion_Flag;
|
|
||||||
if(store_flag_str.equalsIgnoreCase(CommonString.FROM_DEVIATION)){
|
|
||||||
isMappingPromotion_Flag = db.isMappingPromotionData(store_id, category_id, CommonString.TABLE_MAPPING_PROMOTION_ADHOC);
|
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
isMappingPromotion_Flag = db.isMappingPromotionData(store_id, category_id, CommonString.TABLE_MAPPING_PROMOTION);
|
flag_mapping_stock = db.isMappingStockDataStockFacing(category_id, keyAccount_id, storeType_id, class_id, store_id, CommonString.TABLE_MAPPING_STOCK);
|
||||||
}
|
}
|
||||||
if (isMappingPromotion_Flag) {
|
if (flag_mapping_stock) {
|
||||||
if (!db.checkPromoComplianceData(store_id, category_id)) {
|
if (!db.checkMsl_Availability_StockFacingData(store_id, category_id)) {
|
||||||
flag_filled = false;
|
flag_filled = false;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
boolean flag_t2p_mapping;
|
if(country_id.equals("7")){
|
||||||
if(store_flag_str.equalsIgnoreCase(CommonString.FROM_DEVIATION)){
|
if(db.getPromoComplianceSkuwiseExistsAfterData(store_id, category_id).size()==0){
|
||||||
flag_t2p_mapping = db.isMappingT2PData(store_id, category_id,CommonString.TABLE_MAPPING_T2P_ADHOC);
|
flag_filled = false;
|
||||||
}
|
break;
|
||||||
else {
|
}
|
||||||
flag_t2p_mapping = db.isMappingT2PData(store_id, category_id,CommonString.TABLE_MAPPING_T2P);
|
}
|
||||||
}
|
else {
|
||||||
if (flag_t2p_mapping) {
|
boolean isMappingPromotion_Flag;
|
||||||
if (!db.isFilledT2P(store_id, category_id)) {
|
if(store_flag_str.equalsIgnoreCase(CommonString.FROM_DEVIATION)){
|
||||||
flag_filled = false;
|
isMappingPromotion_Flag = db.isMappingPromotionData(store_id, category_id, CommonString.TABLE_MAPPING_PROMOTION_ADHOC);
|
||||||
break;
|
}
|
||||||
|
else {
|
||||||
|
isMappingPromotion_Flag = db.isMappingPromotionData(store_id, category_id, CommonString.TABLE_MAPPING_PROMOTION);
|
||||||
|
}
|
||||||
|
if (isMappingPromotion_Flag) {
|
||||||
|
if (!db.checkPromoComplianceData(store_id, category_id)) {
|
||||||
|
flag_filled = false;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
boolean flag_t2p_mapping;
|
||||||
|
if(store_flag_str.equalsIgnoreCase(CommonString.FROM_DEVIATION)){
|
||||||
if (camera_allow.equalsIgnoreCase("1")) {
|
flag_t2p_mapping = db.isMappingT2PData(store_id, category_id,CommonString.TABLE_MAPPING_T2P_ADHOC);
|
||||||
//if (category_camera_list.size()>0) {
|
|
||||||
if (!db.isCategoryPictureData(store_id, category_id)) {
|
|
||||||
flag_filled = false;
|
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
}
|
else {
|
||||||
|
flag_t2p_mapping = db.isMappingT2PData(store_id, category_id,CommonString.TABLE_MAPPING_T2P);
|
||||||
if(getAuditQnsRemoved(category_id).size()>0){
|
|
||||||
|
|
||||||
if(db.getAfterSaveAuditQuestionAnswerData(store_id, category_id).size() == 0){
|
|
||||||
flag_filled = false;
|
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
}
|
if (flag_t2p_mapping) {
|
||||||
|
if (!db.isFilledT2P(store_id, category_id)) {
|
||||||
|
flag_filled = false;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
if (db.getSubCategoryMasterForPOG(category_id, storeType_id, pog_type_id, null).size() > 0) {
|
|
||||||
if (db.getAfterSavePOGUploadQuestionAnswerData(store_id, category_id).size() == 0) {
|
|
||||||
flag_filled = false;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
//Counterfeit Product Option - Egypt
|
|
||||||
if(country_id.equals("6")){
|
|
||||||
|
|
||||||
if (db.getCounterfeitProductExistsAfterData(store_id, category_id).size() == 0) {
|
|
||||||
flag_filled = false;
|
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
if (camera_allow.equalsIgnoreCase("1")) {
|
||||||
|
//if (category_camera_list.size()>0) {
|
||||||
|
if (!db.isCategoryPictureData(store_id, category_id)) {
|
||||||
|
flag_filled = false;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}else {
|
||||||
|
|
||||||
flag_filled = true;
|
final ArrayList<MSL_AvailabilityStockFacingGetterSetter> sub_category_list = db.getSubCategoryMaster(category_id);
|
||||||
} else {
|
|
||||||
flag_filled = false;
|
//if Sub Group Data exists for any Sub Category of the Category
|
||||||
break;
|
boolean isSubGroupDataExists = false;
|
||||||
|
for(int j=0;j<sub_category_list.size();j++){
|
||||||
|
if(db.getSkuGroupMasterData(category_id, sub_category_list.get(j).getSub_category_id()).size()>0){
|
||||||
|
isSubGroupDataExists = true;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if(isSubGroupDataExists){
|
||||||
|
if (db.getNoCameraCategoryDataInserted(store_id, category_id, null).size() == 0) {
|
||||||
|
flag_filled = false;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if(getAuditQnsRemoved(category_id).size()>0){
|
||||||
|
|
||||||
|
if(db.getAfterSaveAuditQuestionAnswerData(store_id, category_id).size() == 0){
|
||||||
|
flag_filled = false;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (db.getSubCategoryMasterForPOG(category_id, storeType_id, pog_type_id, null).size() > 0) {
|
||||||
|
if (db.getAfterSavePOGUploadQuestionAnswerData(store_id, category_id).size() == 0) {
|
||||||
|
flag_filled = false;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
//Counterfeit Product Option - Egypt
|
||||||
|
if(country_id.equals("6")){
|
||||||
|
|
||||||
|
if (db.getCounterfeitProductExistsAfterData(store_id, category_id).size() == 0) {
|
||||||
|
flag_filled = false;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
flag_filled = true;
|
||||||
|
} else {
|
||||||
|
flag_filled = false;
|
||||||
|
break;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -39,6 +39,7 @@ import cpm.com.gskmtorange.dailyentry.CategoryPicture;
|
|||||||
import cpm.com.gskmtorange.dailyentry.CounterfeitProductsActivity;
|
import cpm.com.gskmtorange.dailyentry.CounterfeitProductsActivity;
|
||||||
import cpm.com.gskmtorange.dailyentry.CreateSelfActivity;
|
import cpm.com.gskmtorange.dailyentry.CreateSelfActivity;
|
||||||
import cpm.com.gskmtorange.dailyentry.POGQuestionsActivity;
|
import cpm.com.gskmtorange.dailyentry.POGQuestionsActivity;
|
||||||
|
import cpm.com.gskmtorange.dailyentry.StockActivity;
|
||||||
import cpm.com.gskmtorange.dailyentry.StockDataActivity;
|
import cpm.com.gskmtorange.dailyentry.StockDataActivity;
|
||||||
import cpm.com.gskmtorange.dailyentry.T2PComplianceActivity;
|
import cpm.com.gskmtorange.dailyentry.T2PComplianceActivity;
|
||||||
import cpm.com.gskmtorange.xmlGetterSetter.AuditDataGetterSetter;
|
import cpm.com.gskmtorange.xmlGetterSetter.AuditDataGetterSetter;
|
||||||
@@ -123,25 +124,12 @@ public class DailyDataMenuActivity extends AppCompatActivity {
|
|||||||
|
|
||||||
DailyDataMenuGetterSetter data = new DailyDataMenuGetterSetter();
|
DailyDataMenuGetterSetter data = new DailyDataMenuGetterSetter();
|
||||||
|
|
||||||
|
//For Additional Stores in Egypt(6) Only Stock Data will be captured
|
||||||
if (country_id.equals("6") && categoryId.equals("3")) {
|
if(store_flag_str.equalsIgnoreCase(CommonString.FROM_ADDITIONAL)){
|
||||||
data = new DailyDataMenuGetterSetter();
|
data = new DailyDataMenuGetterSetter();
|
||||||
data.setCategory_name(getResources().getString(R.string.daily_data_menu_stock_facing));
|
data.setCategory_name(getResources().getString(R.string.stock));
|
||||||
if (isMappingStockData()) {
|
if (isMappingStockData()) {
|
||||||
if (db.checkMsl_Availability_StockFacingData(store_id, categoryId)) {
|
if (db.checkStockData(store_id, categoryId)) {
|
||||||
data.setCategory_img(R.mipmap.msl_availability_done);
|
|
||||||
} else {
|
|
||||||
data.setCategory_img(R.mipmap.msl_availability);
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
data.setCategory_img(R.mipmap.msl_availability_grey);
|
|
||||||
}
|
|
||||||
categoryList.add(data);
|
|
||||||
} else {
|
|
||||||
data = new DailyDataMenuGetterSetter();
|
|
||||||
data.setCategory_name(getResources().getString(R.string.daily_data_menu_msl_availability));
|
|
||||||
if (isMappingStockData()) {
|
|
||||||
if (db.checkMsl_Availability_StockFacingData(store_id, categoryId)) {
|
|
||||||
data.setCategory_img(R.mipmap.msl_availability_done);
|
data.setCategory_img(R.mipmap.msl_availability_done);
|
||||||
} else {
|
} else {
|
||||||
data.setCategory_img(R.mipmap.msl_availability);
|
data.setCategory_img(R.mipmap.msl_availability);
|
||||||
@@ -151,6 +139,34 @@ public class DailyDataMenuActivity extends AppCompatActivity {
|
|||||||
}
|
}
|
||||||
categoryList.add(data);
|
categoryList.add(data);
|
||||||
}
|
}
|
||||||
|
else {
|
||||||
|
if (country_id.equals(CommonString.COUNTRY_ID_EGYPT+"") && categoryId.equals("3")) {
|
||||||
|
data = new DailyDataMenuGetterSetter();
|
||||||
|
data.setCategory_name(getResources().getString(R.string.daily_data_menu_stock_facing));
|
||||||
|
if (isMappingStockData()) {
|
||||||
|
if (db.checkMsl_Availability_StockFacingData(store_id, categoryId)) {
|
||||||
|
data.setCategory_img(R.mipmap.msl_availability_done);
|
||||||
|
} else {
|
||||||
|
data.setCategory_img(R.mipmap.msl_availability);
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
data.setCategory_img(R.mipmap.msl_availability_grey);
|
||||||
|
}
|
||||||
|
categoryList.add(data);
|
||||||
|
} else {
|
||||||
|
data = new DailyDataMenuGetterSetter();
|
||||||
|
data.setCategory_name(getResources().getString(R.string.daily_data_menu_msl_availability));
|
||||||
|
if (isMappingStockData()) {
|
||||||
|
if (db.checkMsl_Availability_StockFacingData(store_id, categoryId)) {
|
||||||
|
data.setCategory_img(R.mipmap.msl_availability_done);
|
||||||
|
} else {
|
||||||
|
data.setCategory_img(R.mipmap.msl_availability);
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
data.setCategory_img(R.mipmap.msl_availability_grey);
|
||||||
|
}
|
||||||
|
categoryList.add(data);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/*data.setCategory_name(getResources().getString(R.string.daily_data_menu_msl_availability));
|
/*data.setCategory_name(getResources().getString(R.string.daily_data_menu_msl_availability));
|
||||||
@@ -180,149 +196,150 @@ public class DailyDataMenuActivity extends AppCompatActivity {
|
|||||||
}
|
}
|
||||||
categoryList.add(data);*/
|
categoryList.add(data);*/
|
||||||
|
|
||||||
//T2p
|
//T2p
|
||||||
data = new DailyDataMenuGetterSetter();
|
data = new DailyDataMenuGetterSetter();
|
||||||
data.setCategory_name(getResources().getString(R.string.daily_data_menu_t2p));
|
data.setCategory_name(getResources().getString(R.string.daily_data_menu_t2p));
|
||||||
boolean flag_t2p_mapping;
|
boolean flag_t2p_mapping;
|
||||||
if (store_flag_str.equalsIgnoreCase(CommonString.FROM_DEVIATION)) {
|
|
||||||
flag_t2p_mapping = db.isMappingT2PData(store_id, categoryId, CommonString.TABLE_MAPPING_T2P_ADHOC);
|
|
||||||
} else {
|
|
||||||
flag_t2p_mapping = db.isMappingT2PData(store_id, categoryId, CommonString.TABLE_MAPPING_T2P);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (flag_t2p_mapping) {
|
|
||||||
if (db.isFilledT2P(store_id, categoryId)) {
|
|
||||||
data.setCategory_img(R.mipmap.t2p_compliance_done);
|
|
||||||
} else {
|
|
||||||
data.setCategory_img(R.mipmap.t2p_compliance);
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
data.setCategory_img(R.mipmap.t2pcompliance_grey);
|
|
||||||
}
|
|
||||||
categoryList.add(data);
|
|
||||||
|
|
||||||
|
|
||||||
//T2p added
|
|
||||||
data = new DailyDataMenuGetterSetter();
|
|
||||||
data.setCategory_name(getResources().getString(R.string.daily_data_menu_additional_visibility));
|
|
||||||
if (db.additionalVisibilitydata(store_id, categoryId)) {
|
|
||||||
data.setCategory_img(R.mipmap.additional_visibility_done);
|
|
||||||
} else {
|
|
||||||
data.setCategory_img(R.mipmap.additional_visibility);
|
|
||||||
}
|
|
||||||
categoryList.add(data);
|
|
||||||
|
|
||||||
|
|
||||||
data = new DailyDataMenuGetterSetter();
|
|
||||||
data.setCategory_name(getResources().getString(R.string.daily_data_menu_promo_compliance));
|
|
||||||
if (country_id.equals("7")) {
|
|
||||||
if (db.getPromoComplianceSkuwiseExistsAfterData(store_id, categoryId).size() == 0) {
|
|
||||||
data.setCategory_img(R.mipmap.promo_compliance);
|
|
||||||
} else {
|
|
||||||
data.setCategory_img(R.mipmap.promo_compliance_done);
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
boolean isMappingPromotion_Flag;
|
|
||||||
if (store_flag_str.equalsIgnoreCase(CommonString.FROM_DEVIATION)) {
|
if (store_flag_str.equalsIgnoreCase(CommonString.FROM_DEVIATION)) {
|
||||||
isMappingPromotion_Flag = db.isMappingPromotionData(store_id, categoryId, CommonString.TABLE_MAPPING_PROMOTION_ADHOC);
|
flag_t2p_mapping = db.isMappingT2PData(store_id, categoryId, CommonString.TABLE_MAPPING_T2P_ADHOC);
|
||||||
} else {
|
} else {
|
||||||
isMappingPromotion_Flag = db.isMappingPromotionData(store_id, categoryId, CommonString.TABLE_MAPPING_PROMOTION);
|
flag_t2p_mapping = db.isMappingT2PData(store_id, categoryId, CommonString.TABLE_MAPPING_T2P);
|
||||||
}
|
}
|
||||||
|
|
||||||
boolean isMappingAdditionalPromotion_Flag;
|
if (flag_t2p_mapping) {
|
||||||
if (store_flag_str.equalsIgnoreCase(CommonString.FROM_DEVIATION)) {
|
if (db.isFilledT2P(store_id, categoryId)) {
|
||||||
isMappingAdditionalPromotion_Flag = db.isMappingAdditionalPromotionData(store_id, categoryId, CommonString.TABLE_MAPPING_ADDITIONAL_PROMOTION_ADHOC);
|
data.setCategory_img(R.mipmap.t2p_compliance_done);
|
||||||
} else {
|
|
||||||
isMappingAdditionalPromotion_Flag = db.isMappingAdditionalPromotionData(store_id, categoryId, CommonString.TABLE_MAPPING_ADDITIONAL_PROMOTION);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (isMappingPromotion_Flag || isMappingAdditionalPromotion_Flag) {
|
|
||||||
if (db.checkPromoComplianceData(store_id, categoryId) ||
|
|
||||||
db.checkAdditionalPromoComplianceData(store_id, categoryId)) {
|
|
||||||
data.setCategory_img(R.mipmap.promo_compliance_done);
|
|
||||||
} else {
|
} else {
|
||||||
data.setCategory_img(R.mipmap.promo_compliance);
|
data.setCategory_img(R.mipmap.t2p_compliance);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
data.setCategory_img(R.mipmap.promocompliance_grey);
|
data.setCategory_img(R.mipmap.t2pcompliance_grey);
|
||||||
}
|
}
|
||||||
}
|
categoryList.add(data);
|
||||||
|
|
||||||
categoryList.add(data);
|
|
||||||
|
|
||||||
//Category Pictures
|
//T2p added
|
||||||
data = new DailyDataMenuGetterSetter();
|
data = new DailyDataMenuGetterSetter();
|
||||||
data.setCategory_name(getResources().getString(R.string.daily_data_menu_category_picture));
|
data.setCategory_name(getResources().getString(R.string.daily_data_menu_additional_visibility));
|
||||||
//category_camera_list = db.getCategoryPicturedata(categoryId, keyAccount_id, storeType_id, class_id);
|
if (db.additionalVisibilitydata(store_id, categoryId)) {
|
||||||
if (camera_allow.equalsIgnoreCase("1")) {
|
data.setCategory_img(R.mipmap.additional_visibility_done);
|
||||||
//if (category_camera_list.size()>0) {
|
|
||||||
if (db.isCategoryPictureData(store_id, categoryId)) {
|
|
||||||
data.setCategory_img(R.mipmap.picturecatogory_done);
|
|
||||||
} else {
|
} else {
|
||||||
data.setCategory_img(R.mipmap.picturecatogory);
|
data.setCategory_img(R.mipmap.additional_visibility);
|
||||||
// }
|
}
|
||||||
} /*else {
|
categoryList.add(data);
|
||||||
|
|
||||||
|
|
||||||
|
data = new DailyDataMenuGetterSetter();
|
||||||
|
data.setCategory_name(getResources().getString(R.string.daily_data_menu_promo_compliance));
|
||||||
|
if (country_id.equals("7")) {
|
||||||
|
if (db.getPromoComplianceSkuwiseExistsAfterData(store_id, categoryId).size() == 0) {
|
||||||
|
data.setCategory_img(R.mipmap.promo_compliance);
|
||||||
|
} else {
|
||||||
|
data.setCategory_img(R.mipmap.promo_compliance_done);
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
boolean isMappingPromotion_Flag;
|
||||||
|
if (store_flag_str.equalsIgnoreCase(CommonString.FROM_DEVIATION)) {
|
||||||
|
isMappingPromotion_Flag = db.isMappingPromotionData(store_id, categoryId, CommonString.TABLE_MAPPING_PROMOTION_ADHOC);
|
||||||
|
} else {
|
||||||
|
isMappingPromotion_Flag = db.isMappingPromotionData(store_id, categoryId, CommonString.TABLE_MAPPING_PROMOTION);
|
||||||
|
}
|
||||||
|
|
||||||
|
boolean isMappingAdditionalPromotion_Flag;
|
||||||
|
if (store_flag_str.equalsIgnoreCase(CommonString.FROM_DEVIATION)) {
|
||||||
|
isMappingAdditionalPromotion_Flag = db.isMappingAdditionalPromotionData(store_id, categoryId, CommonString.TABLE_MAPPING_ADDITIONAL_PROMOTION_ADHOC);
|
||||||
|
} else {
|
||||||
|
isMappingAdditionalPromotion_Flag = db.isMappingAdditionalPromotionData(store_id, categoryId, CommonString.TABLE_MAPPING_ADDITIONAL_PROMOTION);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (isMappingPromotion_Flag || isMappingAdditionalPromotion_Flag) {
|
||||||
|
if (db.checkPromoComplianceData(store_id, categoryId) ||
|
||||||
|
db.checkAdditionalPromoComplianceData(store_id, categoryId)) {
|
||||||
|
data.setCategory_img(R.mipmap.promo_compliance_done);
|
||||||
|
} else {
|
||||||
|
data.setCategory_img(R.mipmap.promo_compliance);
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
data.setCategory_img(R.mipmap.promocompliance_grey);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
categoryList.add(data);
|
||||||
|
|
||||||
|
//Category Pictures
|
||||||
|
data = new DailyDataMenuGetterSetter();
|
||||||
|
data.setCategory_name(getResources().getString(R.string.daily_data_menu_category_picture));
|
||||||
|
//category_camera_list = db.getCategoryPicturedata(categoryId, keyAccount_id, storeType_id, class_id);
|
||||||
|
if (camera_allow.equalsIgnoreCase("1")) {
|
||||||
|
//if (category_camera_list.size()>0) {
|
||||||
|
if (db.isCategoryPictureData(store_id, categoryId)) {
|
||||||
|
data.setCategory_img(R.mipmap.picturecatogory_done);
|
||||||
|
} else {
|
||||||
|
data.setCategory_img(R.mipmap.picturecatogory);
|
||||||
|
// }
|
||||||
|
} /*else {
|
||||||
data.setCategory_img(R.mipmap.picturecatogory_grey);
|
data.setCategory_img(R.mipmap.picturecatogory_grey);
|
||||||
}*/
|
}*/
|
||||||
|
|
||||||
} else {
|
|
||||||
if (db.getNoCameraCategoryDataInserted(store_id, categoryId, null).size() > 0) {
|
|
||||||
data.setCategory_img(R.mipmap.picturecatogory_done);
|
|
||||||
} else {
|
} else {
|
||||||
data.setCategory_img(R.mipmap.picturecatogory);
|
if (db.getNoCameraCategoryDataInserted(store_id, categoryId, null).size() > 0) {
|
||||||
// }
|
data.setCategory_img(R.mipmap.picturecatogory_done);
|
||||||
|
} else {
|
||||||
|
data.setCategory_img(R.mipmap.picturecatogory);
|
||||||
|
// }
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
categoryList.add(data);
|
||||||
categoryList.add(data);
|
|
||||||
|
|
||||||
//Audit
|
//Audit
|
||||||
data = new DailyDataMenuGetterSetter();
|
|
||||||
|
|
||||||
ArrayList<AuditDataGetterSetter> question_list;
|
|
||||||
|
|
||||||
question_list = getAuditQnsRemoved();
|
|
||||||
|
|
||||||
if (question_list.size() > 0) {
|
|
||||||
if (db.getAfterSaveAuditQuestionAnswerData(store_id, categoryId).size() > 0) {
|
|
||||||
data.setCategory_img(R.mipmap.msl_availability_done);
|
|
||||||
} else {
|
|
||||||
data.setCategory_img(R.mipmap.msl_availability);
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
data.setCategory_img(R.mipmap.msl_availability_grey);
|
|
||||||
}
|
|
||||||
|
|
||||||
data.setCategory_name(getString(R.string.audit));
|
|
||||||
categoryList.add(data);
|
|
||||||
|
|
||||||
//POG
|
|
||||||
data = new DailyDataMenuGetterSetter();
|
|
||||||
if (db.getSubCategoryMasterForPOG(categoryId, storeType_id, pog_type_id, null).size() > 0) {
|
|
||||||
if (db.getAfterSavePOGUploadQuestionAnswerData(store_id, categoryId).size() > 0) {
|
|
||||||
data.setCategory_img(R.mipmap.msl_availability_done);
|
|
||||||
} else {
|
|
||||||
data.setCategory_img(R.mipmap.msl_availability);
|
|
||||||
}
|
|
||||||
|
|
||||||
} else {
|
|
||||||
data.setCategory_img(R.mipmap.msl_availability_grey);
|
|
||||||
}
|
|
||||||
|
|
||||||
data.setCategory_name(getString(R.string.pog));
|
|
||||||
categoryList.add(data);
|
|
||||||
|
|
||||||
//Counterfeit Product Option - Egypt
|
|
||||||
if(country_id.equals("6")){
|
|
||||||
data = new DailyDataMenuGetterSetter();
|
data = new DailyDataMenuGetterSetter();
|
||||||
|
|
||||||
if (db.getCounterfeitProductExistsAfterData(store_id, categoryId).size() > 0) {
|
ArrayList<AuditDataGetterSetter> question_list;
|
||||||
data.setCategory_img(R.mipmap.counterfeit_done);
|
|
||||||
|
question_list = getAuditQnsRemoved();
|
||||||
|
|
||||||
|
if (question_list.size() > 0) {
|
||||||
|
if (db.getAfterSaveAuditQuestionAnswerData(store_id, categoryId).size() > 0) {
|
||||||
|
data.setCategory_img(R.mipmap.msl_availability_done);
|
||||||
|
} else {
|
||||||
|
data.setCategory_img(R.mipmap.msl_availability);
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
data.setCategory_img(R.mipmap.counterfeit);
|
data.setCategory_img(R.mipmap.msl_availability_grey);
|
||||||
}
|
}
|
||||||
|
|
||||||
data.setCategory_name(getString(R.string.title_activity_counterfeit_products));
|
data.setCategory_name(getString(R.string.audit));
|
||||||
categoryList.add(data);
|
categoryList.add(data);
|
||||||
|
|
||||||
|
//POG
|
||||||
|
data = new DailyDataMenuGetterSetter();
|
||||||
|
if (db.getSubCategoryMasterForPOG(categoryId, storeType_id, pog_type_id, null).size() > 0) {
|
||||||
|
if (db.getAfterSavePOGUploadQuestionAnswerData(store_id, categoryId).size() > 0) {
|
||||||
|
data.setCategory_img(R.mipmap.msl_availability_done);
|
||||||
|
} else {
|
||||||
|
data.setCategory_img(R.mipmap.msl_availability);
|
||||||
|
}
|
||||||
|
|
||||||
|
} else {
|
||||||
|
data.setCategory_img(R.mipmap.msl_availability_grey);
|
||||||
|
}
|
||||||
|
|
||||||
|
data.setCategory_name(getString(R.string.pog));
|
||||||
|
categoryList.add(data);
|
||||||
|
|
||||||
|
//Counterfeit Product Option - Egypt
|
||||||
|
if(country_id.equals("6")){
|
||||||
|
data = new DailyDataMenuGetterSetter();
|
||||||
|
|
||||||
|
if (db.getCounterfeitProductExistsAfterData(store_id, categoryId).size() > 0) {
|
||||||
|
data.setCategory_img(R.mipmap.counterfeit_done);
|
||||||
|
} else {
|
||||||
|
data.setCategory_img(R.mipmap.counterfeit);
|
||||||
|
}
|
||||||
|
|
||||||
|
data.setCategory_name(getString(R.string.title_activity_counterfeit_products));
|
||||||
|
categoryList.add(data);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -519,7 +536,8 @@ public class DailyDataMenuActivity extends AppCompatActivity {
|
|||||||
} else {
|
} else {
|
||||||
holder.categoryName.setTextColor(getResources().getColor(R.color.grey_background));
|
holder.categoryName.setTextColor(getResources().getColor(R.color.grey_background));
|
||||||
}
|
}
|
||||||
} else if (dailyData.getCategory_name().equalsIgnoreCase(getResources().getString(R.string.daily_data_menu_stock_facing))) {
|
} else if (dailyData.getCategory_name().equalsIgnoreCase(getResources().getString(R.string.daily_data_menu_stock_facing))
|
||||||
|
|| dailyData.getCategory_name().equalsIgnoreCase(getResources().getString(R.string.stock))) {
|
||||||
if (isMappingStockData()) {
|
if (isMappingStockData()) {
|
||||||
holder.categoryName.setTextColor(getResources().getColor(R.color.colorPrimaryDark));
|
holder.categoryName.setTextColor(getResources().getColor(R.color.colorPrimaryDark));
|
||||||
} else {
|
} else {
|
||||||
@@ -674,6 +692,15 @@ public class DailyDataMenuActivity extends AppCompatActivity {
|
|||||||
intent.putExtra("categoryId", categoryId);
|
intent.putExtra("categoryId", categoryId);
|
||||||
startActivity(intent);
|
startActivity(intent);
|
||||||
overridePendingTransition(R.anim.activity_in, R.anim.activity_out);
|
overridePendingTransition(R.anim.activity_in, R.anim.activity_out);
|
||||||
|
}else if (dailyData.getCategory_name().equalsIgnoreCase(getResources().getString(R.string.stock))) {
|
||||||
|
if (isMappingStockData()) {
|
||||||
|
Intent intent = new Intent(DailyDataMenuActivity.this, StockActivity.class);
|
||||||
|
intent.putExtra("categoryName", dailyData.getCategory_name());
|
||||||
|
intent.putExtra("categoryId", categoryId);
|
||||||
|
startActivity(intent);
|
||||||
|
overridePendingTransition(R.anim.activity_in, R.anim.activity_out);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -705,7 +732,10 @@ public class DailyDataMenuActivity extends AppCompatActivity {
|
|||||||
flag = db.isMappingStockDataStockFacing(categoryId, null, null, null, store_id, CommonString.TABLE_MAPPING_STOCK_STOREWISE);
|
flag = db.isMappingStockDataStockFacing(categoryId, null, null, null, store_id, CommonString.TABLE_MAPPING_STOCK_STOREWISE);
|
||||||
} else if (store_flag_str.equalsIgnoreCase(CommonString.FROM_DEVIATION)) {
|
} else if (store_flag_str.equalsIgnoreCase(CommonString.FROM_DEVIATION)) {
|
||||||
flag = db.isMappingStockDataStockFacing(categoryId, keyAccount_id, storeType_id, class_id, store_id, CommonString.TABLE_MAPPING_STOCK_ADHOC);
|
flag = db.isMappingStockDataStockFacing(categoryId, keyAccount_id, storeType_id, class_id, store_id, CommonString.TABLE_MAPPING_STOCK_ADHOC);
|
||||||
} else {
|
} else if(store_flag_str.equalsIgnoreCase(CommonString.FROM_ADDITIONAL)){
|
||||||
|
flag = db.isMappingStockDataStockFacing(categoryId, keyAccount_id, storeType_id, class_id, store_id, CommonString.TABLE_MAPPING_STOCK_ADDITIONAL);
|
||||||
|
}
|
||||||
|
else{
|
||||||
flag = db.isMappingStockDataStockFacing(categoryId, keyAccount_id, storeType_id, class_id, store_id, CommonString.TABLE_MAPPING_STOCK);
|
flag = db.isMappingStockDataStockFacing(categoryId, keyAccount_id, storeType_id, class_id, store_id, CommonString.TABLE_MAPPING_STOCK);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -14,6 +14,7 @@ import android.graphics.Bitmap;
|
|||||||
import android.graphics.BitmapFactory;
|
import android.graphics.BitmapFactory;
|
||||||
import android.graphics.Typeface;
|
import android.graphics.Typeface;
|
||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
|
import android.os.Environment;
|
||||||
import android.preference.PreferenceManager;
|
import android.preference.PreferenceManager;
|
||||||
import android.support.design.widget.FloatingActionButton;
|
import android.support.design.widget.FloatingActionButton;
|
||||||
import android.support.design.widget.Snackbar;
|
import android.support.design.widget.Snackbar;
|
||||||
@@ -45,6 +46,9 @@ import android.widget.TextView;
|
|||||||
import android.widget.ToggleButton;
|
import android.widget.ToggleButton;
|
||||||
|
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
|
import java.io.FileNotFoundException;
|
||||||
|
import java.io.FileOutputStream;
|
||||||
|
import java.io.IOException;
|
||||||
import java.text.DecimalFormat;
|
import java.text.DecimalFormat;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
@@ -93,6 +97,11 @@ public class MSL_Availability_StockFacingActivity extends AppCompatActivity impl
|
|||||||
HashMap<StockFacing_PlanogramTrackerDataGetterSetter, ArrayList<StockFacing_PlanogramTrackerDataGetterSetter>> planogramHashMapListChildData = new HashMap<>();
|
HashMap<StockFacing_PlanogramTrackerDataGetterSetter, ArrayList<StockFacing_PlanogramTrackerDataGetterSetter>> planogramHashMapListChildData = new HashMap<>();
|
||||||
boolean editFlag = false;
|
boolean editFlag = false;
|
||||||
|
|
||||||
|
//temp
|
||||||
|
public static final String FILE_PATH = Environment.getExternalStorageDirectory() + "/";
|
||||||
|
//ImageView bmImage;
|
||||||
|
RelativeLayout view;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void onCreate(Bundle savedInstanceState) {
|
protected void onCreate(Bundle savedInstanceState) {
|
||||||
super.onCreate(savedInstanceState);
|
super.onCreate(savedInstanceState);
|
||||||
@@ -295,6 +304,51 @@ public class MSL_Availability_StockFacingActivity extends AppCompatActivity impl
|
|||||||
} catch (Resources.NotFoundException e) {
|
} catch (Resources.NotFoundException e) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/* view = (RelativeLayout)findViewById(R.id.content_msl__availability);
|
||||||
|
//bmImage = (ImageView)findViewById(R.id.image);
|
||||||
|
|
||||||
|
view.setDrawingCacheEnabled(true);
|
||||||
|
// this is the important code :)
|
||||||
|
// Without it the view will have a dimension of 0,0 and the bitmap will be null
|
||||||
|
|
||||||
|
view.measure(View.MeasureSpec.makeMeasureSpec(0, View.MeasureSpec.UNSPECIFIED),
|
||||||
|
View.MeasureSpec.makeMeasureSpec(0, View.MeasureSpec.UNSPECIFIED));
|
||||||
|
|
||||||
|
view.layout(0, 0, view.getMeasuredWidth(), view.getMeasuredHeight());
|
||||||
|
|
||||||
|
view.buildDrawingCache(true);
|
||||||
|
final Bitmap b = Bitmap.createBitmap(view.getDrawingCache());
|
||||||
|
view.setDrawingCacheEnabled(false); // clear drawing cache
|
||||||
|
|
||||||
|
//bmImage.setImageBitmap(b);
|
||||||
|
|
||||||
|
try{
|
||||||
|
|
||||||
|
|
||||||
|
File yourFile = new File(FILE_PATH+"imgForTxt.png");
|
||||||
|
yourFile.createNewFile(); // if file already exists will do nothing
|
||||||
|
final FileOutputStream stream = new FileOutputStream(yourFile, false); //create your FileOutputStream here
|
||||||
|
|
||||||
|
new Thread(new Runnable() {
|
||||||
|
public void run(){
|
||||||
|
b.compress(Bitmap.CompressFormat.PNG, 85, stream);
|
||||||
|
b.recycle();
|
||||||
|
try {
|
||||||
|
stream.close();
|
||||||
|
} catch (IOException e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}).start();
|
||||||
|
|
||||||
|
}
|
||||||
|
catch (FileNotFoundException e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
} catch (IOException e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
}*/
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -358,7 +412,7 @@ public class MSL_Availability_StockFacingActivity extends AppCompatActivity impl
|
|||||||
ArrayList<MAPPING_PLANOGRAM_DataGetterSetter> mappingPlanogramList;
|
ArrayList<MAPPING_PLANOGRAM_DataGetterSetter> mappingPlanogramList;
|
||||||
|
|
||||||
//Header
|
//Header
|
||||||
if (country_id.equals("7")) {
|
if (country_id.equals("7") || country_id.equals("5")) {
|
||||||
mappingPlanogramList = db.getMappingPlanogramData(categoryId, null, null, store_id, CommonString.TABLE_MAPPING_PLANOGRAM_STORE_WISE);
|
mappingPlanogramList = db.getMappingPlanogramData(categoryId, null, null, store_id, CommonString.TABLE_MAPPING_PLANOGRAM_STORE_WISE);
|
||||||
} else if (store_flag_str.equalsIgnoreCase(CommonString.FROM_DEVIATION)) {
|
} else if (store_flag_str.equalsIgnoreCase(CommonString.FROM_DEVIATION)) {
|
||||||
mappingPlanogramList = db.getMappingPlanogramData(categoryId, storeType_id, class_id, null, CommonString.TABLE_MAPPING_PLANOGRAM_ADHOC);
|
mappingPlanogramList = db.getMappingPlanogramData(categoryId, storeType_id, class_id, null, CommonString.TABLE_MAPPING_PLANOGRAM_ADHOC);
|
||||||
|
|||||||
@@ -53,6 +53,7 @@ import com.google.firebase.analytics.FirebaseAnalytics;
|
|||||||
import com.google.firebase.perf.FirebasePerformance;
|
import com.google.firebase.perf.FirebasePerformance;
|
||||||
import com.google.firebase.perf.metrics.Trace;
|
import com.google.firebase.perf.metrics.Trace;
|
||||||
import com.google.gson.Gson;
|
import com.google.gson.Gson;
|
||||||
|
import com.google.gson.reflect.TypeToken;
|
||||||
|
|
||||||
import org.ksoap2.SoapEnvelope;
|
import org.ksoap2.SoapEnvelope;
|
||||||
import org.ksoap2.serialization.SoapObject;
|
import org.ksoap2.serialization.SoapObject;
|
||||||
@@ -65,7 +66,9 @@ import org.xmlpull.v1.XmlPullParserFactory;
|
|||||||
import java.io.File;
|
import java.io.File;
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.io.StringReader;
|
import java.io.StringReader;
|
||||||
|
import java.lang.reflect.Type;
|
||||||
import java.net.MalformedURLException;
|
import java.net.MalformedURLException;
|
||||||
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import cpm.com.gskmtorange.LoginActivity;
|
import cpm.com.gskmtorange.LoginActivity;
|
||||||
@@ -168,19 +171,19 @@ public class MPinActivity extends AppCompatActivity implements
|
|||||||
//preferences = PreferenceManager.getDefaultSharedPreferences(this);
|
//preferences = PreferenceManager.getDefaultSharedPreferences(this);
|
||||||
String mpin = preferences.getString(CommonString.MPIN, null);
|
String mpin = preferences.getString(CommonString.MPIN, null);
|
||||||
blurLockView.setCorrectPassword(mpin);
|
blurLockView.setCorrectPassword(mpin);
|
||||||
blurLockView.setLeftButton("Forgot MPin");
|
blurLockView.setLeftButton(getString(R.string.forget_mpin));
|
||||||
blurLockView.setTitle("Please Enter Four Digit MPin");
|
blurLockView.setTitle(getString(R.string.pls_enter_four_digit_mpin));
|
||||||
} else {
|
} else {
|
||||||
blurLockView.setCorrectPassword("abcd");
|
blurLockView.setCorrectPassword("abcd");
|
||||||
blurLockView.setLeftButton("Set MPin");
|
blurLockView.setLeftButton(getString(R.string.set_mpin));
|
||||||
blurLockView.setTitle("Please Set Four Digit MPin");
|
blurLockView.setTitle(getString(R.string.pls_set_four_digit_mpin));
|
||||||
}
|
}
|
||||||
|
|
||||||
blurLockView.setIs_Password_Check_Mode(IS_PASSWORD_CHECK);
|
blurLockView.setIs_Password_Check_Mode(IS_PASSWORD_CHECK);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
blurLockView.setRightButton("Clear");
|
blurLockView.setRightButton(getString(R.string.clear));
|
||||||
blurLockView.setTypeface(getTypeface());
|
blurLockView.setTypeface(getTypeface());
|
||||||
blurLockView.setOnLeftButtonClickListener(this);
|
blurLockView.setOnLeftButtonClickListener(this);
|
||||||
blurLockView.setOnPasswordInputListener(this);
|
blurLockView.setOnPasswordInputListener(this);
|
||||||
@@ -269,7 +272,7 @@ public class MPinActivity extends AppCompatActivity implements
|
|||||||
View view = snackbar.getView();
|
View view = snackbar.getView();
|
||||||
/*TextView tv = (TextView)view.findViewById(android.support.design.R.id.snackbar_text);
|
/*TextView tv = (TextView)view.findViewById(android.support.design.R.id.snackbar_text);
|
||||||
tv.setTextColor(Color.RED);*/
|
tv.setTextColor(Color.RED);*/
|
||||||
snackbar.setAction("Reset", new View.OnClickListener() {
|
snackbar.setAction(R.string.reset, new View.OnClickListener() {
|
||||||
@Override
|
@Override
|
||||||
public void onClick(View v) {
|
public void onClick(View v) {
|
||||||
|
|
||||||
@@ -340,7 +343,7 @@ public class MPinActivity extends AppCompatActivity implements
|
|||||||
View view = snackbar.getView();
|
View view = snackbar.getView();
|
||||||
/*TextView tv = (TextView)view.findViewById(android.support.design.R.id.snackbar_text);
|
/*TextView tv = (TextView)view.findViewById(android.support.design.R.id.snackbar_text);
|
||||||
tv.setTextColor(Color.RED);*/
|
tv.setTextColor(Color.RED);*/
|
||||||
snackbar.setAction("Reset", new View.OnClickListener() {
|
snackbar.setAction(R.string.reset, new View.OnClickListener() {
|
||||||
@Override
|
@Override
|
||||||
public void onClick(View v) {
|
public void onClick(View v) {
|
||||||
|
|
||||||
@@ -790,55 +793,101 @@ public class MPinActivity extends AppCompatActivity implements
|
|||||||
|
|
||||||
if (result.equals(CommonString.KEY_SUCCESS)) {
|
if (result.equals(CommonString.KEY_SUCCESS)) {
|
||||||
|
|
||||||
// database.open();
|
//set true for South Africa
|
||||||
if (preferences.getString(CommonString.KEY_VERSION, "").equals(
|
boolean forSA = true;
|
||||||
Integer.toString(versionCode))) {
|
|
||||||
|
|
||||||
Intent in = new Intent(getApplicationContext(), MainActivity.class);
|
if(forSA){
|
||||||
in.putExtra(CommonString.IS_PASSWORD_CHECK, false);
|
//For SA Only
|
||||||
startActivity(in);
|
if (preferences.getString(CommonString.KEY_LANGUAGE, "").equals("")) {
|
||||||
finish();
|
|
||||||
|
Intent intent = new Intent(getBaseContext(),
|
||||||
|
SelectLanguageActivity.class);
|
||||||
|
|
||||||
|
intent.putExtra(CommonString.KEY_LOGIN_DATA, lgs);
|
||||||
|
startActivity(intent);
|
||||||
|
|
||||||
|
finish();
|
||||||
|
} else {
|
||||||
|
|
||||||
|
setLanguageDataFromSharedPreferences();
|
||||||
|
|
||||||
|
CommonFunctions.updateLangResources(getApplicationContext(), preferences.getString(CommonString.KEY_LANGUAGE, ""));
|
||||||
|
|
||||||
|
Intent intent = new Intent(getBaseContext(),
|
||||||
|
MainActivity.class);
|
||||||
|
startActivity(intent);
|
||||||
|
|
||||||
|
finish();
|
||||||
|
|
||||||
|
//uploadPreviousImages();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
//for other than SA
|
||||||
|
//database.open();
|
||||||
|
if (preferences.getString(CommonString.KEY_VERSION, "").equals(
|
||||||
|
Integer.toString(versionCode))) {
|
||||||
|
|
||||||
|
setLanguageDataFromSharedPreferences();
|
||||||
|
|
||||||
|
Intent in = new Intent(getApplicationContext(), MainActivity.class);
|
||||||
|
in.putExtra(CommonString.IS_PASSWORD_CHECK, false);
|
||||||
|
startActivity(in);
|
||||||
|
finish();
|
||||||
|
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
Intent intent = new Intent(getBaseContext(),
|
Intent intent = new Intent(getBaseContext(),
|
||||||
AutoUpdateActivity.class);
|
AutoUpdateActivity.class);
|
||||||
|
|
||||||
intent.putExtra(CommonString.KEY_PATH,
|
intent.putExtra(CommonString.KEY_PATH,
|
||||||
preferences.getString(CommonString.KEY_PATH, ""));
|
preferences.getString(CommonString.KEY_PATH, ""));
|
||||||
startActivity(intent);
|
startActivity(intent);
|
||||||
finish();
|
finish();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//For SA Only
|
|
||||||
/*if (preferences.getString(CommonString.KEY_LANGUAGE, "").equals("")) {
|
|
||||||
|
|
||||||
Intent intent = new Intent(getBaseContext(),
|
|
||||||
SelectLanguageActivity.class);
|
|
||||||
|
|
||||||
intent.putExtra(CommonString.KEY_LOGIN_DATA, lgs);
|
|
||||||
startActivity(intent);
|
|
||||||
|
|
||||||
finish();
|
|
||||||
} else {
|
|
||||||
|
|
||||||
CommonFunctions.updateLangResources(getApplicationContext(), preferences.getString(CommonString.KEY_LANGUAGE, ""));
|
|
||||||
|
|
||||||
Intent intent = new Intent(getBaseContext(),
|
|
||||||
MainActivity.class);
|
|
||||||
startActivity(intent);
|
|
||||||
|
|
||||||
finish();
|
|
||||||
|
|
||||||
//uploadPreviousImages();
|
|
||||||
}*/
|
|
||||||
}
|
}
|
||||||
dialog.dismiss();
|
dialog.dismiss();
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
ArrayList<String> language, culture_id, notice_url;
|
||||||
|
|
||||||
|
LoginGetterSetter login_data;
|
||||||
|
|
||||||
|
private void setLanguageDataFromSharedPreferences(){
|
||||||
|
Gson gson = new Gson();
|
||||||
|
login_data = new LoginGetterSetter();
|
||||||
|
|
||||||
|
String jsonPreferences = preferences.getString(CommonString.KEY_LOOGIN_PREF, "");
|
||||||
|
|
||||||
|
Type type = new TypeToken<LoginGetterSetter>() {}.getType();
|
||||||
|
login_data = gson.fromJson(jsonPreferences, type);
|
||||||
|
|
||||||
|
language = login_data.getCULTURE_NAME();
|
||||||
|
culture_id = login_data.getCULTURE_ID();
|
||||||
|
notice_url = login_data.getNOTICE_URL();
|
||||||
|
|
||||||
|
String lang = preferences.getString(CommonString.KEY_LANGUAGE, "");
|
||||||
|
|
||||||
|
if(language.size()>0){
|
||||||
|
for(int i=0; i<language.size();i++){
|
||||||
|
if(lang.equals(language.get(i))){
|
||||||
|
editor.putString(CommonString.KEY_LANGUAGE, language.get(i));
|
||||||
|
editor.putString(CommonString.KEY_CULTURE_ID, culture_id.get(i));
|
||||||
|
editor.putString(CommonString.KEY_NOTICE_BOARD_LINK, notice_url.get(i));
|
||||||
|
editor.commit();
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
//return ;
|
||||||
|
}
|
||||||
|
|
||||||
public void showAlert(String str) {
|
public void showAlert(String str) {
|
||||||
|
|
||||||
AlertDialog.Builder builder = new AlertDialog.Builder(MPinActivity.this);
|
AlertDialog.Builder builder = new AlertDialog.Builder(MPinActivity.this);
|
||||||
|
|||||||
@@ -0,0 +1,773 @@
|
|||||||
|
package cpm.com.gskmtorange.pharma_stores;
|
||||||
|
|
||||||
|
import android.app.AlertDialog;
|
||||||
|
import android.content.ActivityNotFoundException;
|
||||||
|
import android.content.Context;
|
||||||
|
import android.content.DialogInterface;
|
||||||
|
import android.content.Intent;
|
||||||
|
import android.content.SharedPreferences;
|
||||||
|
import android.content.pm.ApplicationInfo;
|
||||||
|
import android.content.pm.PackageManager;
|
||||||
|
import android.graphics.Color;
|
||||||
|
import android.graphics.Typeface;
|
||||||
|
import android.net.Uri;
|
||||||
|
import android.os.Build;
|
||||||
|
import android.os.Bundle;
|
||||||
|
import android.preference.PreferenceManager;
|
||||||
|
import android.provider.MediaStore;
|
||||||
|
import android.support.design.widget.FloatingActionButton;
|
||||||
|
import android.support.v4.app.Fragment;
|
||||||
|
import android.support.v4.content.FileProvider;
|
||||||
|
import android.support.v7.widget.CardView;
|
||||||
|
import android.util.Log;
|
||||||
|
import android.view.LayoutInflater;
|
||||||
|
import android.view.View;
|
||||||
|
import android.view.ViewGroup;
|
||||||
|
import android.view.inputmethod.InputMethodManager;
|
||||||
|
import android.widget.AbsListView;
|
||||||
|
import android.widget.BaseExpandableListAdapter;
|
||||||
|
import android.widget.EditText;
|
||||||
|
import android.widget.ExpandableListView;
|
||||||
|
import android.widget.ImageView;
|
||||||
|
import android.widget.LinearLayout;
|
||||||
|
import android.widget.RadioButton;
|
||||||
|
import android.widget.RadioGroup;
|
||||||
|
import android.widget.RelativeLayout;
|
||||||
|
import android.widget.TextView;
|
||||||
|
|
||||||
|
import java.io.File;
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.HashMap;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
import cpm.com.gskmtorange.Database.GSKOrangeDB;
|
||||||
|
import cpm.com.gskmtorange.R;
|
||||||
|
import cpm.com.gskmtorange.constant.CommonFunctions;
|
||||||
|
import cpm.com.gskmtorange.constant.CommonString;
|
||||||
|
import cpm.com.gskmtorange.dailyentry.StockActivity;
|
||||||
|
import cpm.com.gskmtorange.xmlGetterSetter.MSL_AvailabilityStockFacingGetterSetter;
|
||||||
|
import cpm.com.gskmtorange.xmlGetterSetter.MSL_AvailabilityStockFacingGetterSetter;
|
||||||
|
import cpm.com.gskmtorange.xmlGetterSetter.PharmaMSLInsertedGetterSetter;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* A simple {@link Fragment} subclass.
|
||||||
|
* Activities that contain this fragment must implement the
|
||||||
|
* {@link MSLFragment.OnFragmentInteractionListener} interface
|
||||||
|
* to handle interaction events.
|
||||||
|
* Use the {@link MSLFragment#newInstance} factory method to
|
||||||
|
* create an instance of this fragment.
|
||||||
|
*/
|
||||||
|
public class MSLFragment extends Fragment {
|
||||||
|
// TODO: Rename parameter arguments, choose names that match
|
||||||
|
// the fragment initialization parameters, e.g. ARG_ITEM_NUMBER
|
||||||
|
private static final String CategoryName = "categoryName";
|
||||||
|
private static final String CategoryId = "categoryId";
|
||||||
|
|
||||||
|
private OnFragmentInteractionListener mListener;
|
||||||
|
|
||||||
|
GSKOrangeDB db;
|
||||||
|
|
||||||
|
String categoryName, categoryId, storeId, Error_Message = "";
|
||||||
|
String store_id, visit_date, username, intime, date, keyAccount_id, class_id, storeType_id, country_id, store_flag_str;
|
||||||
|
boolean isDialogOpen = true;
|
||||||
|
private SharedPreferences preferences;
|
||||||
|
int scrollPosition = 0;
|
||||||
|
|
||||||
|
ExpandableListView expandableListView;
|
||||||
|
ExpandableListAdapter adapter;
|
||||||
|
|
||||||
|
ArrayList<MSL_AvailabilityStockFacingGetterSetter> headerDataList;
|
||||||
|
ArrayList<PharmaMSLInsertedGetterSetter> childDataList;
|
||||||
|
List<MSL_AvailabilityStockFacingGetterSetter> hashMapListHeaderData;
|
||||||
|
HashMap<MSL_AvailabilityStockFacingGetterSetter, List<PharmaMSLInsertedGetterSetter>> hashMapListChildData;
|
||||||
|
|
||||||
|
List<Integer> checkHeaderArray = new ArrayList<>();
|
||||||
|
boolean checkflag = true;
|
||||||
|
FloatingActionButton fab;
|
||||||
|
boolean editFlag = false;
|
||||||
|
|
||||||
|
String gallery_package = "";
|
||||||
|
Uri outputFileUri;
|
||||||
|
|
||||||
|
String str = CommonString.FILE_PATH, path = "", _pathforcheck = "";
|
||||||
|
|
||||||
|
int child_position = -1;
|
||||||
|
int group_position = -1;
|
||||||
|
|
||||||
|
public MSLFragment() {
|
||||||
|
// Required empty public constructor
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Use this factory method to create a new instance of
|
||||||
|
* this fragment using the provided parameters.
|
||||||
|
*
|
||||||
|
* @param param1 Parameter 1.
|
||||||
|
* @param param2 Parameter 2.
|
||||||
|
* @return A new instance of fragment MSLFragment.
|
||||||
|
*/
|
||||||
|
// TODO: Rename and change types and number of parameters
|
||||||
|
public static MSLFragment newInstance(String param1, String param2) {
|
||||||
|
MSLFragment fragment = new MSLFragment();
|
||||||
|
Bundle args = new Bundle();
|
||||||
|
args.putString(CategoryName, param1);
|
||||||
|
args.putString(CategoryId, param2);
|
||||||
|
fragment.setArguments(args);
|
||||||
|
return fragment;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onCreate(Bundle savedInstanceState) {
|
||||||
|
super.onCreate(savedInstanceState);
|
||||||
|
if (getArguments() != null) {
|
||||||
|
categoryName = getArguments().getString(CategoryName);
|
||||||
|
categoryId = getArguments().getString(CategoryId);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public View onCreateView(LayoutInflater inflater, ViewGroup container,
|
||||||
|
Bundle savedInstanceState) {
|
||||||
|
View view = inflater.inflate(R.layout.fragment_msl, container, false);
|
||||||
|
// Inflate the layout for this fragment
|
||||||
|
|
||||||
|
expandableListView = (ExpandableListView) view.findViewById(R.id.expandableListView);
|
||||||
|
fab = (FloatingActionButton) getActivity().findViewById(R.id.fab);
|
||||||
|
|
||||||
|
preferences = PreferenceManager.getDefaultSharedPreferences(getActivity());
|
||||||
|
CommonFunctions.updateLangResources(getActivity(), preferences.getString(CommonString.KEY_LANGUAGE, ""));
|
||||||
|
store_id = preferences.getString(CommonString.KEY_STORE_ID, null);
|
||||||
|
visit_date = preferences.getString(CommonString.KEY_DATE, null);
|
||||||
|
date = preferences.getString(CommonString.KEY_DATE, null);
|
||||||
|
username = preferences.getString(CommonString.KEY_USERNAME, null);
|
||||||
|
intime = preferences.getString(CommonString.KEY_STORE_IN_TIME, "");
|
||||||
|
keyAccount_id = preferences.getString(CommonString.KEY_KEYACCOUNT_ID, "");
|
||||||
|
class_id = preferences.getString(CommonString.KEY_CLASS_ID, "");
|
||||||
|
storeType_id = preferences.getString(CommonString.KEY_STORETYPE_ID, "");
|
||||||
|
country_id = preferences.getString(CommonString.KEY_COUNTRY_ID, "");
|
||||||
|
store_flag_str = preferences.getString(CommonString.KEY_STORE_FLAG, null);
|
||||||
|
|
||||||
|
expandableListView = (ExpandableListView) view.findViewById(R.id.expandableListView);
|
||||||
|
|
||||||
|
getActivity().setTitle(R.string.msl_availability_availability);
|
||||||
|
|
||||||
|
db = new GSKOrangeDB(getActivity());
|
||||||
|
db.open();
|
||||||
|
|
||||||
|
prepareList();
|
||||||
|
|
||||||
|
fab.setOnClickListener(new View.OnClickListener() {
|
||||||
|
@Override
|
||||||
|
public void onClick(View v) {
|
||||||
|
|
||||||
|
if(validateData(headerDataList, hashMapListChildData)){
|
||||||
|
db.InsertPharmaMSL(store_id, headerDataList, hashMapListChildData);
|
||||||
|
|
||||||
|
//update status to valid
|
||||||
|
db.updateCheckoutStatus(store_id, CommonString.KEY_VALID, CommonString.KEY_JOURNEY_PLAN_PHARMA);
|
||||||
|
|
||||||
|
onButtonPressed();
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
for (int i = 0; i < adapter.getGroupCount(); i++)
|
||||||
|
expandableListView.expandGroup(i);
|
||||||
|
|
||||||
|
AlertDialog.Builder builder = new AlertDialog.Builder(getActivity());
|
||||||
|
builder.setMessage(Error_Message)
|
||||||
|
.setCancelable(false)
|
||||||
|
.setPositiveButton(R.string.ok, new DialogInterface.OnClickListener() {
|
||||||
|
public void onClick(DialogInterface dialog, int id) {
|
||||||
|
expandableListView.smoothScrollToPosition(scrollPosition);
|
||||||
|
|
||||||
|
dialog.dismiss();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
AlertDialog alert = builder.create();
|
||||||
|
alert.show();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
return view;
|
||||||
|
}
|
||||||
|
|
||||||
|
// TODO: Rename method, update argument and hook method into UI event
|
||||||
|
public void onButtonPressed() {
|
||||||
|
if (mListener != null) {
|
||||||
|
mListener.onFragmentInteraction(getActivity().getSupportFragmentManager().findFragmentById(R.id.fragment));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onAttach(Context context) {
|
||||||
|
super.onAttach(context);
|
||||||
|
if (context instanceof OnFragmentInteractionListener) {
|
||||||
|
mListener = (OnFragmentInteractionListener) context;
|
||||||
|
} else {
|
||||||
|
throw new RuntimeException(context.toString()
|
||||||
|
+ " must implement OnFragmentInteractionListener");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onDetach() {
|
||||||
|
super.onDetach();
|
||||||
|
mListener = null;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This interface must be implemented by activities that contain this
|
||||||
|
* fragment to allow an interaction in this fragment to be communicated
|
||||||
|
* to the activity and potentially other fragments contained in that
|
||||||
|
* activity.
|
||||||
|
* <p>
|
||||||
|
* See the Android Training lesson <a href=
|
||||||
|
* "http://developer.android.com/training/basics/fragments/communicating.html"
|
||||||
|
* >Communicating with Other Fragments</a> for more information.
|
||||||
|
*/
|
||||||
|
public interface OnFragmentInteractionListener {
|
||||||
|
// TODO: Update argument type and name
|
||||||
|
void onFragmentInteraction(Fragment uri);
|
||||||
|
}
|
||||||
|
|
||||||
|
private void prepareList() {
|
||||||
|
try {
|
||||||
|
hashMapListHeaderData = new ArrayList<>();
|
||||||
|
hashMapListChildData = new HashMap<>();
|
||||||
|
|
||||||
|
//Header
|
||||||
|
headerDataList = db.getPharmaMSLHeaderData();
|
||||||
|
|
||||||
|
if (headerDataList.size() > 0) {
|
||||||
|
for (int i = 0; i < headerDataList.size(); i++) {
|
||||||
|
hashMapListHeaderData.add(headerDataList.get(i));
|
||||||
|
|
||||||
|
childDataList = new ArrayList<>();
|
||||||
|
//childDataList = db.getStockAfterSaveData(categoryId, headerDataList.get(i).getBrand_id(), store_id);
|
||||||
|
if (childDataList.size() == 0) {
|
||||||
|
childDataList = db.getPharmaMSLSKUData(headerDataList.get(i).getBrand_id());
|
||||||
|
}
|
||||||
|
|
||||||
|
hashMapListChildData.put(hashMapListHeaderData.get(i), childDataList);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
adapter = new ExpandableListAdapter(getActivity(), hashMapListHeaderData, hashMapListChildData);
|
||||||
|
expandableListView.setAdapter(adapter);
|
||||||
|
|
||||||
|
expandableListView.setOnScrollListener(new AbsListView.OnScrollListener() {
|
||||||
|
@Override
|
||||||
|
public void onScroll(AbsListView view, int firstVisibleItem, int visibleItemCount, int totalItemCount) {
|
||||||
|
|
||||||
|
expandableListView.invalidate();
|
||||||
|
|
||||||
|
int lastItem = firstVisibleItem + visibleItemCount;
|
||||||
|
|
||||||
|
if (firstVisibleItem == 0) {
|
||||||
|
fab.show();//setVisibility(View.VISIBLE);
|
||||||
|
} else if (lastItem == totalItemCount) {
|
||||||
|
fab.hide();//setVisibility(View.INVISIBLE);
|
||||||
|
} else {
|
||||||
|
fab.show();//setVisibility(View.VISIBLE);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onScrollStateChanged(AbsListView arg0, int arg1) {
|
||||||
|
InputMethodManager inputManager = (InputMethodManager) getActivity()
|
||||||
|
.getSystemService(Context.INPUT_METHOD_SERVICE);
|
||||||
|
if (getActivity().getCurrentFocus() != null) {
|
||||||
|
inputManager.hideSoftInputFromWindow(getActivity().getCurrentFocus().getWindowToken(), 0);
|
||||||
|
getActivity().getCurrentFocus().clearFocus();
|
||||||
|
}
|
||||||
|
|
||||||
|
expandableListView.invalidateViews();
|
||||||
|
//adapter.notifyDataSetChanged();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
// Listview Group click listener
|
||||||
|
expandableListView.setOnGroupClickListener(new ExpandableListView.OnGroupClickListener() {
|
||||||
|
@Override
|
||||||
|
public boolean onGroupClick(ExpandableListView parent, View v, int groupPosition, long id) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
// Listview Group expanded listener
|
||||||
|
expandableListView.setOnGroupExpandListener(new ExpandableListView.OnGroupExpandListener() {
|
||||||
|
@Override
|
||||||
|
public void onGroupExpand(int groupPosition) {
|
||||||
|
InputMethodManager inputManager = (InputMethodManager) getActivity()
|
||||||
|
.getSystemService(Context.INPUT_METHOD_SERVICE);
|
||||||
|
if (getActivity().getWindow().getCurrentFocus() != null) {
|
||||||
|
inputManager.hideSoftInputFromWindow(getActivity().getCurrentFocus().getWindowToken(), 0);
|
||||||
|
getActivity().getCurrentFocus().clearFocus();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
// Listview Group collasped listener
|
||||||
|
expandableListView.setOnGroupCollapseListener(new ExpandableListView.OnGroupCollapseListener() {
|
||||||
|
@Override
|
||||||
|
public void onGroupCollapse(int groupPosition) {
|
||||||
|
InputMethodManager inputManager = (InputMethodManager) getActivity().getApplicationContext()
|
||||||
|
.getSystemService(Context.INPUT_METHOD_SERVICE);
|
||||||
|
if (getActivity().getWindow().getCurrentFocus() != null) {
|
||||||
|
inputManager.hideSoftInputFromWindow(getActivity().getCurrentFocus().getWindowToken(), 0);
|
||||||
|
getActivity().getCurrentFocus().clearFocus();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
// Listview on child click listener
|
||||||
|
expandableListView.setOnChildClickListener(new ExpandableListView.OnChildClickListener() {
|
||||||
|
@Override
|
||||||
|
public boolean onChildClick(ExpandableListView parent, View v, int groupPosition,
|
||||||
|
int childPosition, long id) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
} catch (Exception e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public class ExpandableListAdapter extends BaseExpandableListAdapter {
|
||||||
|
private Context _context;
|
||||||
|
private List<MSL_AvailabilityStockFacingGetterSetter> _listDataHeader;
|
||||||
|
private HashMap<MSL_AvailabilityStockFacingGetterSetter, List<PharmaMSLInsertedGetterSetter>> _listDataChild;
|
||||||
|
|
||||||
|
public ExpandableListAdapter(Context context, List<MSL_AvailabilityStockFacingGetterSetter> listDataHeader,
|
||||||
|
HashMap<MSL_AvailabilityStockFacingGetterSetter, List<PharmaMSLInsertedGetterSetter>> listChildData) {
|
||||||
|
this._context = context;
|
||||||
|
this._listDataHeader = listDataHeader;
|
||||||
|
this._listDataChild = listChildData;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Object getGroup(int groupPosition) {
|
||||||
|
return this._listDataHeader.get(groupPosition);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int getGroupCount() {
|
||||||
|
return this._listDataHeader.size();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public long getGroupId(int groupPosition) {
|
||||||
|
return groupPosition;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public View getGroupView(final int groupPosition, boolean isExpanded, View convertView, ViewGroup parent) {
|
||||||
|
MSL_AvailabilityStockFacingGetterSetter headerTitle = (MSL_AvailabilityStockFacingGetterSetter) getGroup(groupPosition);
|
||||||
|
|
||||||
|
if (convertView == null) {
|
||||||
|
LayoutInflater infalInflater = (LayoutInflater) this._context.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
|
||||||
|
convertView = infalInflater.inflate(R.layout.item_msl_availability_stock_facing_header, null, false);
|
||||||
|
}
|
||||||
|
|
||||||
|
TextView txt_categoryHeader = (TextView) convertView.findViewById(R.id.txt_categoryHeader);
|
||||||
|
RelativeLayout rel_header = (RelativeLayout) convertView.findViewById(R.id.rel_categoryHeader);
|
||||||
|
ImageView img_camera = (ImageView) convertView.findViewById(R.id.img_camera);
|
||||||
|
CardView card_view = (CardView) convertView.findViewById(R.id.card_view);
|
||||||
|
|
||||||
|
txt_categoryHeader.setTypeface(null, Typeface.BOLD);
|
||||||
|
|
||||||
|
if (headerTitle.getCompany_id().equals("1")) {
|
||||||
|
txt_categoryHeader.setTextColor(getResources().getColor(R.color.colorPrimaryDark));
|
||||||
|
} else {
|
||||||
|
txt_categoryHeader.setTextColor(getResources().getColor(R.color.black));
|
||||||
|
}
|
||||||
|
txt_categoryHeader.setText(headerTitle.getSub_category() + "-" + headerTitle.getBrand());
|
||||||
|
|
||||||
|
|
||||||
|
if (!checkflag) {
|
||||||
|
if (checkHeaderArray.contains(groupPosition)) {
|
||||||
|
card_view.setCardBackgroundColor(getResources().getColor(android.R.color.holo_red_dark));
|
||||||
|
} else {
|
||||||
|
card_view.setCardBackgroundColor(getResources().getColor(R.color.grey_background));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
//empty check color change
|
||||||
|
/*if (headerTitle.getCompany_id().equals("1")) {
|
||||||
|
if (!checkflag) {
|
||||||
|
if (checkHeaderArray.contains(groupPosition)) {
|
||||||
|
//card_view.setCardBackgroundColor(getResources().getColor(android.R.color.holo_red_dark));
|
||||||
|
txt_categoryHeader.setTextColor(getResources().getColor(android.R.color.holo_red_dark));
|
||||||
|
} else {
|
||||||
|
txt_categoryHeader.setTextColor(getResources().getColor(R.color.colorPrimaryDark));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
if (!checkflag) {
|
||||||
|
if (checkHeaderArray.contains(groupPosition)) {
|
||||||
|
txt_categoryHeader.setTextColor(getResources().getColor(android.R.color.holo_red_dark));
|
||||||
|
} else {
|
||||||
|
txt_categoryHeader.setTextColor(getResources().getColor(R.color.black));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}*/
|
||||||
|
|
||||||
|
return convertView;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Object getChild(int groupPosition, int childPosititon) {
|
||||||
|
return this._listDataChild.get(this._listDataHeader.get(groupPosition)).get(childPosititon);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int getChildrenCount(int groupPosition) {
|
||||||
|
return this._listDataChild.get(this._listDataHeader.get(groupPosition)).size();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public long getChildId(int groupPosition, int childPosition) {
|
||||||
|
return childPosition;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public View getChildView(final int groupPosition, final int childPosition, boolean isLastChild,
|
||||||
|
View convertView, ViewGroup parent) {
|
||||||
|
|
||||||
|
final PharmaMSLInsertedGetterSetter childData =
|
||||||
|
(PharmaMSLInsertedGetterSetter) getChild(groupPosition, childPosition);
|
||||||
|
ViewHolder holder = null;
|
||||||
|
|
||||||
|
if (convertView == null) {
|
||||||
|
LayoutInflater infalInflater = (LayoutInflater) this._context.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
|
||||||
|
convertView = infalInflater.inflate(R.layout.pharma_msl_item, null, false);
|
||||||
|
|
||||||
|
holder = new ViewHolder();
|
||||||
|
holder.cardView = (CardView) convertView.findViewById(R.id.card_view);
|
||||||
|
holder.lin_category = (LinearLayout) convertView.findViewById(R.id.lin_category);
|
||||||
|
|
||||||
|
holder.txt_skuName = (TextView) convertView.findViewById(R.id.txt_skuName);
|
||||||
|
|
||||||
|
holder.rg = (RadioGroup) convertView.findViewById(R.id.radio_group);
|
||||||
|
holder.radio_yes = (RadioButton) convertView.findViewById(R.id.radio_yes);
|
||||||
|
holder.radio_no = (RadioButton) convertView.findViewById(R.id.radio_no);
|
||||||
|
holder.img_cam = (ImageView) convertView.findViewById(R.id.img_cam);
|
||||||
|
|
||||||
|
convertView.setTag(holder);
|
||||||
|
} else {
|
||||||
|
holder = (ViewHolder) convertView.getTag();
|
||||||
|
}
|
||||||
|
|
||||||
|
//hidden for MSL
|
||||||
|
holder.img_cam.setVisibility(View.GONE);
|
||||||
|
|
||||||
|
holder.txt_skuName.setText(childData.getSku());
|
||||||
|
|
||||||
|
/* if (childData.getCompany_id().equals("1") && childData.getMust_have().equals("1")) {
|
||||||
|
holder.lin_category.setBackgroundColor(getResources().getColor(R.color.colorOrange));
|
||||||
|
|
||||||
|
} else {
|
||||||
|
|
||||||
|
holder.lin_category.setBackgroundColor(getResources().getColor(R.color.white));
|
||||||
|
|
||||||
|
}*/
|
||||||
|
|
||||||
|
holder.lin_category.setBackgroundColor(getResources().getColor(R.color.white));
|
||||||
|
|
||||||
|
/*if (childData.getCompany_id().equals("1")) {
|
||||||
|
|
||||||
|
if (childData.getMust_have().equals("1")) {
|
||||||
|
holder.txt_skuName.setTextColor(getResources().getColor(R.color.colorPrimary));
|
||||||
|
} else {
|
||||||
|
holder.txt_skuName.setTextColor(getResources().getColor(R.color.blue));
|
||||||
|
}
|
||||||
|
|
||||||
|
} else {
|
||||||
|
holder.txt_skuName.setTextColor(getResources().getColor(R.color.black));
|
||||||
|
}
|
||||||
|
*/
|
||||||
|
|
||||||
|
final ViewHolder finalHolder1 = holder;
|
||||||
|
holder.rg.setOnCheckedChangeListener(new RadioGroup.OnCheckedChangeListener() {
|
||||||
|
@Override
|
||||||
|
public void onCheckedChanged(RadioGroup group, int checkedId) {
|
||||||
|
if (finalHolder1.radio_yes.isChecked()) {
|
||||||
|
|
||||||
|
finalHolder1.radio_yes.setBackground(getActivity().getResources().getDrawable(R.mipmap.yes_green));
|
||||||
|
finalHolder1.radio_no.setBackground(getActivity().getResources().getDrawable(R.mipmap.no_white));
|
||||||
|
//finalHolder1.img_cam.setVisibility(View.VISIBLE);
|
||||||
|
|
||||||
|
childData.setPresent(1);
|
||||||
|
//adapter.notifyDataSetChanged();
|
||||||
|
}
|
||||||
|
if (finalHolder1.radio_no.isChecked()){
|
||||||
|
|
||||||
|
finalHolder1.radio_no.setBackground(getActivity().getResources().getDrawable(R.mipmap.no_red));
|
||||||
|
finalHolder1.radio_yes.setBackground(getActivity().getResources().getDrawable(R.mipmap.yes_white));
|
||||||
|
//finalHolder1.img_cam.setVisibility(View.GONE);
|
||||||
|
|
||||||
|
childData.setPresent(0);
|
||||||
|
//adapter.notifyDataSetChanged();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
//Camera
|
||||||
|
/* holder.img_cam.setOnClickListener(new View.OnClickListener() {
|
||||||
|
@Override
|
||||||
|
public void onClick(View v) {
|
||||||
|
_pathforcheck = "Pharma_MSL_Image_" + store_id + categoryId + "_" + childData.getBrand_id() + visit_date.replace("/", "") + "_" +
|
||||||
|
CommonFunctions.getCurrentTimeWithLanguage(getActivity()).replace(":", "") + ".jpg";
|
||||||
|
child_position = childPosition;
|
||||||
|
group_position = groupPosition;
|
||||||
|
path = str + _pathforcheck;
|
||||||
|
|
||||||
|
startCameraActivity(1);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
if(childData.getPresent()==1){
|
||||||
|
holder.radio_yes.setBackground(getActivity().getResources().getDrawable(R.mipmap.yes_green));
|
||||||
|
holder.radio_no.setBackground(getActivity().getResources().getDrawable(R.mipmap.no_white));
|
||||||
|
//holder.img_cam.setVisibility(View.VISIBLE);
|
||||||
|
holder.radio_yes.setChecked(true);
|
||||||
|
//notifyDataSetChanged();
|
||||||
|
}
|
||||||
|
else if(childData.getPresent()==0){
|
||||||
|
holder.radio_yes.setBackground(getActivity().getResources().getDrawable(R.mipmap.yes_white));
|
||||||
|
holder.radio_no.setBackground(getActivity().getResources().getDrawable(R.mipmap.no_red));
|
||||||
|
//holder.img_cam.setVisibility(View.GONE);
|
||||||
|
holder.radio_no.setChecked(true);
|
||||||
|
//notifyDataSetChanged();
|
||||||
|
}else {
|
||||||
|
holder.radio_yes.setBackground(getActivity().getResources().getDrawable(R.mipmap.yes_white));
|
||||||
|
holder.radio_no.setBackground(getActivity().getResources().getDrawable(R.mipmap.no_white));
|
||||||
|
//holder.img_cam.setVisibility(View.GONE);
|
||||||
|
holder.rg.clearCheck();
|
||||||
|
//notifyDataSetChanged();
|
||||||
|
}
|
||||||
|
|
||||||
|
/* if(childData.getImgPath().equals("")){
|
||||||
|
holder.img_cam.setBackgroundResource(R.mipmap.camera_orange);
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
holder.img_cam.setBackgroundResource(R.mipmap.camera_green);
|
||||||
|
}*/
|
||||||
|
|
||||||
|
//empty check color change
|
||||||
|
if (!checkflag) {
|
||||||
|
boolean tempflag = false;
|
||||||
|
|
||||||
|
if (tempflag) {
|
||||||
|
//holder.cardView.setCardBackgroundColor(getResources().getColor(android.R.color.holo_red_dark));
|
||||||
|
holder.lin_category.setBackgroundColor(getResources().getColor(android.R.color.holo_red_dark));
|
||||||
|
} else {
|
||||||
|
holder.lin_category.setBackgroundColor(getResources().getColor(R.color.white));
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
return convertView;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean hasStableIds() {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean isChildSelectable(int groupPosition, int childPosition) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public class ViewHolder {
|
||||||
|
CardView cardView;
|
||||||
|
TextView txt_skuName;
|
||||||
|
LinearLayout lin_category;
|
||||||
|
RadioGroup rg;
|
||||||
|
RadioButton radio_yes;
|
||||||
|
RadioButton radio_no;
|
||||||
|
ImageView img_cam;
|
||||||
|
}
|
||||||
|
|
||||||
|
private void startCameraActivity(int pos) {
|
||||||
|
try {
|
||||||
|
|
||||||
|
Log.i("Stock & Facing ", "startCameraActivity()");
|
||||||
|
File file = new File(path);
|
||||||
|
outputFileUri = FileProvider.getUriForFile(getActivity(), "cpm.com.gskmtorange.fileprovider", file);
|
||||||
|
|
||||||
|
String defaultCameraPackage = "";
|
||||||
|
final PackageManager packageManager = getActivity().getPackageManager();
|
||||||
|
List<ApplicationInfo> list = packageManager.getInstalledApplications(PackageManager.GET_UNINSTALLED_PACKAGES);
|
||||||
|
for (int n = 0; n < list.size(); n++) {
|
||||||
|
if ((list.get(n).flags & ApplicationInfo.FLAG_SYSTEM) == 1) {
|
||||||
|
/* Log.e("TAG", "Installed Applications : " + list.get(n).loadLabel(packageManager).toString());
|
||||||
|
Log.e("TAG", "package name : " + list.get(n).packageName);*/
|
||||||
|
|
||||||
|
//temp value in case camera is gallery app above jellybean
|
||||||
|
String packag = list.get(n).loadLabel(packageManager).toString();
|
||||||
|
if (packag.equalsIgnoreCase("Gallery") || packag.equalsIgnoreCase("Galeri") || packag.equalsIgnoreCase("الاستوديو")) {
|
||||||
|
gallery_package = list.get(n).packageName;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (android.os.Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT) {
|
||||||
|
if (packag.equalsIgnoreCase("Camera") || packag.equalsIgnoreCase("Kamera") || packag.equalsIgnoreCase("الكاميرا")) {
|
||||||
|
defaultCameraPackage = list.get(n).packageName;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
|
||||||
|
if (packag.equalsIgnoreCase("Camera") || packag.equalsIgnoreCase("Kamera") || packag.equalsIgnoreCase("الكاميرا")) {
|
||||||
|
|
||||||
|
defaultCameraPackage = list.get(n).packageName;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
Intent intent = new Intent(MediaStore.ACTION_IMAGE_CAPTURE);
|
||||||
|
intent.putExtra(MediaStore.EXTRA_OUTPUT, outputFileUri);
|
||||||
|
intent.setPackage(defaultCameraPackage);
|
||||||
|
//startActivityForResult(intent, 1);
|
||||||
|
startActivityForResult(intent, pos);
|
||||||
|
//startActivityForResult(intent, position);
|
||||||
|
|
||||||
|
} catch (ActivityNotFoundException e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
|
||||||
|
Intent intent = new Intent(MediaStore.ACTION_IMAGE_CAPTURE);
|
||||||
|
intent.putExtra(MediaStore.EXTRA_OUTPUT, outputFileUri);
|
||||||
|
intent.setPackage(gallery_package);
|
||||||
|
//startActivityForResult(intent, 0);
|
||||||
|
startActivityForResult(intent, pos);
|
||||||
|
|
||||||
|
} catch (Exception e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/*@Override
|
||||||
|
public void onActivityResult(int requestCode, int resultCode, Intent data) {
|
||||||
|
Log.e("Stock & Facing", "resultCode: " + resultCode + " requestCode: " + requestCode);
|
||||||
|
*//*switch (resultCode) {
|
||||||
|
case 0:
|
||||||
|
Log.e("Stock & Facing", "User cancelled");
|
||||||
|
|
||||||
|
break;
|
||||||
|
case -1:
|
||||||
|
if (_pathforcheck != null && !_pathforcheck.equals("")) {
|
||||||
|
if (new File(str + _pathforcheck).exists()) {
|
||||||
|
img = _pathforcheck;
|
||||||
|
t2PAdapter.notifyDataSetChanged();
|
||||||
|
_pathforcheck = "";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}*//*
|
||||||
|
|
||||||
|
switch (requestCode) {
|
||||||
|
case 1:
|
||||||
|
if (resultCode == 0) {
|
||||||
|
Log.e("Stock & Facing", "User cancelled");
|
||||||
|
} else if (resultCode == -1) {
|
||||||
|
if (_pathforcheck != null && !_pathforcheck.equals("")) {
|
||||||
|
if (new File(str + _pathforcheck).exists()) {
|
||||||
|
|
||||||
|
hashMapListChildData.get(headerDataList.get(group_position)).get(child_position).setImgPath(_pathforcheck);
|
||||||
|
|
||||||
|
expandableListView.invalidateViews();
|
||||||
|
adapter.notifyDataSetChanged();
|
||||||
|
_pathforcheck = "";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
super.onActivityResult(requestCode, resultCode, data);
|
||||||
|
}*/
|
||||||
|
|
||||||
|
boolean validateData(List<MSL_AvailabilityStockFacingGetterSetter> listDataHeader,
|
||||||
|
HashMap<MSL_AvailabilityStockFacingGetterSetter, List<PharmaMSLInsertedGetterSetter>> listDataChild) {
|
||||||
|
boolean flag = true, child_flag = true, all_flag = true;
|
||||||
|
|
||||||
|
checkHeaderArray.clear();
|
||||||
|
int childCount = 0;
|
||||||
|
|
||||||
|
//temp list data for empty only
|
||||||
|
List<MSL_AvailabilityStockFacingGetterSetter> listDataHeaderTemp = new ArrayList<>();
|
||||||
|
|
||||||
|
HashMap<MSL_AvailabilityStockFacingGetterSetter, List<MSL_AvailabilityStockFacingGetterSetter>> listDataChildTemp = new HashMap<>();
|
||||||
|
|
||||||
|
|
||||||
|
for (int i = 0; i < listDataHeader.size(); i++) {
|
||||||
|
flag = true;
|
||||||
|
|
||||||
|
List<MSL_AvailabilityStockFacingGetterSetter> listTemp = new ArrayList<>();
|
||||||
|
|
||||||
|
for (int j = 0; j < listDataChild.get(listDataHeader.get(i)).size(); j++) {
|
||||||
|
|
||||||
|
child_flag = true;
|
||||||
|
|
||||||
|
PharmaMSLInsertedGetterSetter data = listDataChild.get(listDataHeader.get(i)).get(j);
|
||||||
|
|
||||||
|
int isChecked = data.getPresent();
|
||||||
|
//String imgPath = data.getImgPath();
|
||||||
|
|
||||||
|
if(isChecked==-1){
|
||||||
|
|
||||||
|
scrollPosition = i + j + childCount;
|
||||||
|
|
||||||
|
flag = false;
|
||||||
|
Error_Message = getResources().getString(R.string.msg_select_present);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
/* else if (isChecked==1) {
|
||||||
|
|
||||||
|
if(imgPath == null || imgPath.equals("")){
|
||||||
|
|
||||||
|
scrollPosition = i + j + childCount;
|
||||||
|
|
||||||
|
flag = false;
|
||||||
|
Error_Message = getResources().getString(R.string.click_image);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}*/
|
||||||
|
/*if (!child_flag)
|
||||||
|
listTemp.add(data);*/
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
if (flag == false) {
|
||||||
|
//checkflag = false;
|
||||||
|
/* listDataHeaderTemp.add(listDataHeader.get(i));
|
||||||
|
listDataChildTemp.put(listDataHeader.get(i), listTemp);*/
|
||||||
|
|
||||||
|
if (!checkHeaderArray.contains(i)) {
|
||||||
|
checkHeaderArray.add(i);
|
||||||
|
}
|
||||||
|
checkflag = false;
|
||||||
|
break;
|
||||||
|
} else {
|
||||||
|
childCount = childCount + listDataChild.get(listDataHeader.get(i)).size();
|
||||||
|
checkflag = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/* if (!all_flag) {
|
||||||
|
adapter = new ExpandableListAdapter(this, listDataHeaderTemp, listDataChildTemp);
|
||||||
|
expandableListView.setAdapter(adapter);
|
||||||
|
checkflag = false;
|
||||||
|
} else {
|
||||||
|
checkflag = true;
|
||||||
|
}*/
|
||||||
|
|
||||||
|
return checkflag;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,110 @@
|
|||||||
|
package cpm.com.gskmtorange.pharma_stores;
|
||||||
|
|
||||||
|
import android.app.FragmentTransaction;
|
||||||
|
import android.content.SharedPreferences;
|
||||||
|
import android.net.Uri;
|
||||||
|
import android.os.Bundle;
|
||||||
|
import android.preference.PreferenceManager;
|
||||||
|
import android.support.design.widget.FloatingActionButton;
|
||||||
|
import android.support.design.widget.Snackbar;
|
||||||
|
import android.support.v4.app.Fragment;
|
||||||
|
import android.support.v7.app.AppCompatActivity;
|
||||||
|
import android.support.v7.widget.Toolbar;
|
||||||
|
import android.view.View;
|
||||||
|
|
||||||
|
import cpm.com.gskmtorange.R;
|
||||||
|
import cpm.com.gskmtorange.constant.CommonString;
|
||||||
|
|
||||||
|
public class PharmaActivity extends AppCompatActivity implements StoreDetailFragment.OnFragmentInteractionListener, MSLFragment.OnFragmentInteractionListener, SOSFragment.OnFragmentInteractionListener{
|
||||||
|
private SharedPreferences.Editor editor = null;
|
||||||
|
private SharedPreferences preferences;
|
||||||
|
FloatingActionButton fab;
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected void onCreate(Bundle savedInstanceState) {
|
||||||
|
super.onCreate(savedInstanceState);
|
||||||
|
setContentView(R.layout.activity_paharma);
|
||||||
|
Toolbar toolbar = findViewById(R.id.toolbar);
|
||||||
|
setSupportActionBar(toolbar);
|
||||||
|
|
||||||
|
preferences = PreferenceManager.getDefaultSharedPreferences(this);
|
||||||
|
|
||||||
|
editor = preferences.edit();
|
||||||
|
|
||||||
|
|
||||||
|
Bundle bundle = new Bundle();
|
||||||
|
bundle.putString("categoryName", "Oral Health");
|
||||||
|
bundle.putString("categoryId", "2");
|
||||||
|
StoreDetailFragment fragment = new StoreDetailFragment();
|
||||||
|
fragment.setArguments(bundle);
|
||||||
|
|
||||||
|
getSupportFragmentManager().beginTransaction().replace(R.id.fragment, fragment).commit();
|
||||||
|
|
||||||
|
fab = findViewById(R.id.fab);
|
||||||
|
fab.setOnClickListener(new View.OnClickListener() {
|
||||||
|
@Override
|
||||||
|
public void onClick(View view) {
|
||||||
|
Fragment f = getSupportFragmentManager().findFragmentById(R.id.fragment);
|
||||||
|
if(f instanceof StoreDetailFragment){
|
||||||
|
Bundle bundle = new Bundle();
|
||||||
|
bundle.putString("categoryName", "Oral Health");
|
||||||
|
bundle.putString("categoryId", "2");
|
||||||
|
SOSFragment fragment = new SOSFragment();
|
||||||
|
fragment.setArguments(bundle);
|
||||||
|
|
||||||
|
getSupportFragmentManager().beginTransaction().replace(R.id.fragment, fragment).commit();
|
||||||
|
}
|
||||||
|
else if(f instanceof SOSFragment){
|
||||||
|
Bundle bundle = new Bundle();
|
||||||
|
bundle.putString("categoryName", "Oral Health");
|
||||||
|
bundle.putString("categoryId", "2");
|
||||||
|
MSLFragment fragment = new MSLFragment();
|
||||||
|
fragment.setArguments(bundle);
|
||||||
|
|
||||||
|
getSupportFragmentManager().beginTransaction().replace(R.id.fragment, fragment).commit();
|
||||||
|
} else{
|
||||||
|
// do something with f
|
||||||
|
Snackbar.make(fab, "---",Snackbar.LENGTH_SHORT).show();
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onFragmentInteraction(Fragment f) {
|
||||||
|
|
||||||
|
if(f instanceof StoreDetailFragment){
|
||||||
|
Bundle bundle = new Bundle();
|
||||||
|
bundle.putString("categoryName", "Oral Health");
|
||||||
|
bundle.putString("categoryId", "2");
|
||||||
|
SOSFragment fragment = new SOSFragment();
|
||||||
|
fragment.setArguments(bundle);
|
||||||
|
|
||||||
|
getSupportFragmentManager().beginTransaction().replace(R.id.fragment, fragment).commit();
|
||||||
|
}
|
||||||
|
else if(f instanceof SOSFragment){
|
||||||
|
Bundle bundle = new Bundle();
|
||||||
|
bundle.putString("categoryName", "Oral Health");
|
||||||
|
bundle.putString("categoryId", "2");
|
||||||
|
MSLFragment fragment = new MSLFragment();
|
||||||
|
fragment.setArguments(bundle);
|
||||||
|
|
||||||
|
getSupportFragmentManager().beginTransaction().replace(R.id.fragment, fragment).commit();
|
||||||
|
}else if(f instanceof MSLFragment){
|
||||||
|
/*Bundle bundle = new Bundle();
|
||||||
|
bundle.putString("categoryName", "Oral Health");
|
||||||
|
bundle.putString("categoryId", "2");
|
||||||
|
MSLFragment fragment = new MSLFragment();
|
||||||
|
fragment.setArguments(bundle);
|
||||||
|
|
||||||
|
getSupportFragmentManager().beginTransaction().replace(R.id.fragment, fragment).commit();*/
|
||||||
|
finish();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onBackPressed() {
|
||||||
|
//super.onBackPressed();
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,24 @@
|
|||||||
|
package cpm.com.gskmtorange.pharma_stores;
|
||||||
|
|
||||||
|
import android.support.v4.app.Fragment;
|
||||||
|
import android.os.Bundle;
|
||||||
|
import android.view.LayoutInflater;
|
||||||
|
import android.view.View;
|
||||||
|
import android.view.ViewGroup;
|
||||||
|
|
||||||
|
import cpm.com.gskmtorange.R;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* A placeholder fragment containing a simple view.
|
||||||
|
*/
|
||||||
|
public class PharmaActivityFragment extends Fragment {
|
||||||
|
|
||||||
|
public PharmaActivityFragment() {
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public View onCreateView(LayoutInflater inflater, ViewGroup container,
|
||||||
|
Bundle savedInstanceState) {
|
||||||
|
return inflater.inflate(R.layout.fragment_paharma, container, false);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,353 @@
|
|||||||
|
package cpm.com.gskmtorange.pharma_stores;
|
||||||
|
|
||||||
|
import android.app.AlertDialog;
|
||||||
|
import android.content.Context;
|
||||||
|
import android.content.DialogInterface;
|
||||||
|
import android.content.SharedPreferences;
|
||||||
|
import android.net.Uri;
|
||||||
|
import android.os.Bundle;
|
||||||
|
import android.preference.PreferenceManager;
|
||||||
|
import android.support.annotation.NonNull;
|
||||||
|
import android.support.design.widget.FloatingActionButton;
|
||||||
|
import android.support.v4.app.Fragment;
|
||||||
|
import android.support.v7.widget.CardView;
|
||||||
|
import android.support.v7.widget.LinearLayoutManager;
|
||||||
|
import android.support.v7.widget.RecyclerView;
|
||||||
|
import android.view.LayoutInflater;
|
||||||
|
import android.view.View;
|
||||||
|
import android.view.ViewGroup;
|
||||||
|
import android.widget.EditText;
|
||||||
|
import android.widget.TextView;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
import cpm.com.gskmtorange.Database.GSKOrangeDB;
|
||||||
|
import cpm.com.gskmtorange.R;
|
||||||
|
import cpm.com.gskmtorange.constant.CommonFunctions;
|
||||||
|
import cpm.com.gskmtorange.constant.CommonString;
|
||||||
|
import cpm.com.gskmtorange.xmlGetterSetter.MappingPharmaQuestionGetterSetter;
|
||||||
|
import cpm.com.gskmtorange.xmlGetterSetter.PharmaSOSGetterSetter;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* A simple {@link Fragment} subclass.
|
||||||
|
* Activities that contain this fragment must implement the
|
||||||
|
* {@link SOSFragment.OnFragmentInteractionListener} interface
|
||||||
|
* to handle interaction events.
|
||||||
|
* Use the {@link SOSFragment#newInstance} factory method to
|
||||||
|
* create an instance of this fragment.
|
||||||
|
*/
|
||||||
|
public class SOSFragment extends Fragment {
|
||||||
|
// TODO: Rename parameter arguments, choose names that match
|
||||||
|
// the fragment initialization parameters, e.g. ARG_ITEM_NUMBER
|
||||||
|
private static final String ARG_PARAM1 = "param1";
|
||||||
|
private static final String ARG_PARAM2 = "param2";
|
||||||
|
|
||||||
|
// TODO: Rename and change types of parameters
|
||||||
|
private String mParam1;
|
||||||
|
private String mParam2;
|
||||||
|
|
||||||
|
private OnFragmentInteractionListener mListener;
|
||||||
|
|
||||||
|
RecyclerView rec_sos;
|
||||||
|
|
||||||
|
private SharedPreferences preferences;
|
||||||
|
String store_id, visit_date, username, intime, keyAccount_id, class_id, storeType_id, country_id, store_flag_str;
|
||||||
|
GSKOrangeDB db;
|
||||||
|
|
||||||
|
FloatingActionButton fab;
|
||||||
|
|
||||||
|
ArrayList<PharmaSOSGetterSetter> listBrandSubGroup;
|
||||||
|
|
||||||
|
String Error_Message = "";
|
||||||
|
int scrollPosition = 0;
|
||||||
|
boolean checkflag = true;
|
||||||
|
|
||||||
|
SOSAdapter adapter;
|
||||||
|
|
||||||
|
public SOSFragment() {
|
||||||
|
// Required empty public constructor
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Use this factory method to create a new instance of
|
||||||
|
* this fragment using the provided parameters.
|
||||||
|
*
|
||||||
|
* @param param1 Parameter 1.
|
||||||
|
* @param param2 Parameter 2.
|
||||||
|
* @return A new instance of fragment SOSFragment.
|
||||||
|
*/
|
||||||
|
// TODO: Rename and change types and number of parameters
|
||||||
|
public static SOSFragment newInstance(String param1, String param2) {
|
||||||
|
SOSFragment fragment = new SOSFragment();
|
||||||
|
Bundle args = new Bundle();
|
||||||
|
args.putString(ARG_PARAM1, param1);
|
||||||
|
args.putString(ARG_PARAM2, param2);
|
||||||
|
fragment.setArguments(args);
|
||||||
|
return fragment;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onCreate(Bundle savedInstanceState) {
|
||||||
|
super.onCreate(savedInstanceState);
|
||||||
|
if (getArguments() != null) {
|
||||||
|
mParam1 = getArguments().getString(ARG_PARAM1);
|
||||||
|
mParam2 = getArguments().getString(ARG_PARAM2);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public View onCreateView(LayoutInflater inflater, ViewGroup container,
|
||||||
|
Bundle savedInstanceState) {
|
||||||
|
// Inflate the layout for this fragment
|
||||||
|
View view = inflater.inflate(R.layout.fragment_so, container, false);
|
||||||
|
|
||||||
|
preferences = PreferenceManager.getDefaultSharedPreferences(getActivity());
|
||||||
|
CommonFunctions.updateLangResources(getActivity(), preferences.getString(CommonString.KEY_LANGUAGE, ""));
|
||||||
|
store_id = preferences.getString(CommonString.KEY_STORE_ID, null);
|
||||||
|
visit_date = preferences.getString(CommonString.KEY_DATE, null);
|
||||||
|
username = preferences.getString(CommonString.KEY_USERNAME, null);
|
||||||
|
intime = preferences.getString(CommonString.KEY_STORE_IN_TIME, "");
|
||||||
|
keyAccount_id = preferences.getString(CommonString.KEY_KEYACCOUNT_ID, "");
|
||||||
|
class_id = preferences.getString(CommonString.KEY_CLASS_ID, "");
|
||||||
|
storeType_id = preferences.getString(CommonString.KEY_STORETYPE_ID, "");
|
||||||
|
country_id = preferences.getString(CommonString.KEY_COUNTRY_ID, "");
|
||||||
|
store_flag_str = preferences.getString(CommonString.KEY_STORE_FLAG, null);
|
||||||
|
|
||||||
|
fab = (FloatingActionButton) getActivity().findViewById(R.id.fab);
|
||||||
|
|
||||||
|
rec_sos = view.findViewById(R.id.rec_sos);
|
||||||
|
|
||||||
|
getActivity().setTitle(R.string.sos_detail);
|
||||||
|
|
||||||
|
db = new GSKOrangeDB(getActivity());
|
||||||
|
db.open();
|
||||||
|
|
||||||
|
prepareList();
|
||||||
|
|
||||||
|
fab.setOnClickListener(new View.OnClickListener() {
|
||||||
|
@Override
|
||||||
|
public void onClick(View v) {
|
||||||
|
rec_sos.clearFocus();
|
||||||
|
if(validateData(listBrandSubGroup)){
|
||||||
|
db.InsertSOSPharma(store_id, listBrandSubGroup);
|
||||||
|
onButtonPressed();
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
|
||||||
|
AlertDialog.Builder builder = new AlertDialog.Builder(getActivity());
|
||||||
|
builder.setMessage(Error_Message)
|
||||||
|
.setCancelable(false)
|
||||||
|
.setPositiveButton(R.string.ok, new DialogInterface.OnClickListener() {
|
||||||
|
public void onClick(DialogInterface dialog, int id) {
|
||||||
|
adapter.notifyDataSetChanged();
|
||||||
|
dialog.dismiss();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
AlertDialog alert = builder.create();
|
||||||
|
alert.show();
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
return view;
|
||||||
|
}
|
||||||
|
|
||||||
|
// TODO: Rename method, update argument and hook method into UI event
|
||||||
|
public void onButtonPressed() {
|
||||||
|
if (mListener != null) {
|
||||||
|
mListener.onFragmentInteraction(getActivity().getSupportFragmentManager().findFragmentById(R.id.fragment));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onAttach(Context context) {
|
||||||
|
super.onAttach(context);
|
||||||
|
if (context instanceof OnFragmentInteractionListener) {
|
||||||
|
mListener = (OnFragmentInteractionListener) context;
|
||||||
|
} else {
|
||||||
|
/*throw new RuntimeException(context.toString()
|
||||||
|
+ " must implement OnFragmentInteractionListener");*/
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onDetach() {
|
||||||
|
super.onDetach();
|
||||||
|
mListener = null;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This interface must be implemented by activities that contain this
|
||||||
|
* fragment to allow an interaction in this fragment to be communicated
|
||||||
|
* to the activity and potentially other fragments contained in that
|
||||||
|
* activity.
|
||||||
|
* <p>
|
||||||
|
* See the Android Training lesson <a href=
|
||||||
|
* "http://developer.android.com/training/basics/fragments/communicating.html"
|
||||||
|
* >Communicating with Other Fragments</a> for more information.
|
||||||
|
*/
|
||||||
|
public interface OnFragmentInteractionListener {
|
||||||
|
// TODO: Update argument type and name
|
||||||
|
void onFragmentInteraction(Fragment uri);
|
||||||
|
}
|
||||||
|
|
||||||
|
void prepareList(){
|
||||||
|
listBrandSubGroup = db.getStoreDetailPharmaForSOSData(store_id, "1");
|
||||||
|
adapter = new SOSAdapter(getActivity());
|
||||||
|
rec_sos.setAdapter(adapter);
|
||||||
|
rec_sos.setLayoutManager(new LinearLayoutManager(getActivity()));
|
||||||
|
}
|
||||||
|
|
||||||
|
class SOSAdapter extends RecyclerView.Adapter<SOSAdapter.MyViewHolder> {
|
||||||
|
|
||||||
|
private LayoutInflater inflator;
|
||||||
|
|
||||||
|
public SOSAdapter(Context context) {
|
||||||
|
inflator = LayoutInflater.from(context);
|
||||||
|
//this.data = data;
|
||||||
|
}
|
||||||
|
|
||||||
|
@NonNull
|
||||||
|
@Override
|
||||||
|
public MyViewHolder onCreateViewHolder(@NonNull ViewGroup parent, int i) {
|
||||||
|
View view = inflator.inflate(R.layout.item_pharma_sos, parent, false);
|
||||||
|
|
||||||
|
MyViewHolder holder = new MyViewHolder(view);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
return holder;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onBindViewHolder(@NonNull MyViewHolder myViewHolder, int position) {
|
||||||
|
final PharmaSOSGetterSetter current = listBrandSubGroup.get(position);
|
||||||
|
|
||||||
|
/*holder.stock.setOnFocusChangeListener(new View.OnFocusChangeListener() {
|
||||||
|
@Override
|
||||||
|
public void onFocusChange(View v, boolean hasFocus) {
|
||||||
|
final EditText caption = (EditText) v;
|
||||||
|
String edStock = caption.getText().toString().replaceFirst("^0+(?!$)", "");*/
|
||||||
|
myViewHolder.et_gsk_facing.setOnFocusChangeListener(new View.OnFocusChangeListener() {
|
||||||
|
@Override
|
||||||
|
public void onFocusChange(View v, boolean hasFocus) {
|
||||||
|
if(!hasFocus){
|
||||||
|
final EditText caption = (EditText) v;
|
||||||
|
String gskFacing = caption.getText().toString().replaceFirst("^0+(?!$)", "");
|
||||||
|
|
||||||
|
if(gskFacing.equals("")){
|
||||||
|
current.setGskFacing("");
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
current.setGskFacing(gskFacing);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
myViewHolder.et_competitor_facing.setOnFocusChangeListener(new View.OnFocusChangeListener() {
|
||||||
|
@Override
|
||||||
|
public void onFocusChange(View v, boolean hasFocus) {
|
||||||
|
if(!hasFocus){
|
||||||
|
final EditText caption = (EditText) v;
|
||||||
|
String compFacing = caption.getText().toString().replaceFirst("^0+(?!$)", "");
|
||||||
|
|
||||||
|
if(compFacing.equals("")){
|
||||||
|
current.setCompetitorFacing("");
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
current.setCompetitorFacing(compFacing);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
myViewHolder.tv_brand.setText(current.getSUB_CATEGORY() +" - "+ current.getBRAND());
|
||||||
|
myViewHolder.et_gsk_facing.setText(current.getGskFacing());
|
||||||
|
myViewHolder.et_competitor_facing.setText(current.getCompetitorFacing());
|
||||||
|
|
||||||
|
if(!checkflag){
|
||||||
|
if(current.getGskFacing()==null || current.getGskFacing().equals("") || current.getCompetitorFacing()==null || current.getCompetitorFacing().equals("")){
|
||||||
|
myViewHolder.card_view.setCardBackgroundColor(getResources().getColor(android.R.color.holo_red_dark));
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
myViewHolder.card_view.setCardBackgroundColor(getResources().getColor(R.color.white));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int getItemCount() {
|
||||||
|
|
||||||
|
return listBrandSubGroup.size();
|
||||||
|
}
|
||||||
|
|
||||||
|
class MyViewHolder extends RecyclerView.ViewHolder {
|
||||||
|
|
||||||
|
TextView tv_brand;
|
||||||
|
EditText et_gsk_facing, et_competitor_facing;
|
||||||
|
CardView card_view;
|
||||||
|
|
||||||
|
public MyViewHolder(@NonNull View itemView) {
|
||||||
|
super(itemView);
|
||||||
|
tv_brand = (TextView) itemView.findViewById(R.id.tv_brand);
|
||||||
|
et_gsk_facing = (EditText) itemView.findViewById(R.id.et_gsk_facing);
|
||||||
|
et_competitor_facing = (EditText) itemView.findViewById(R.id.et_competitor_facing);
|
||||||
|
card_view = (CardView) itemView.findViewById(R.id.card_view);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
boolean validateData(List<PharmaSOSGetterSetter> listData) {
|
||||||
|
boolean flag = true, child_flag = true, all_flag = true;
|
||||||
|
|
||||||
|
int childCount = 0;
|
||||||
|
|
||||||
|
//temp list data for empty only
|
||||||
|
List<MappingPharmaQuestionGetterSetter> listDataHeaderTemp = new ArrayList<>();
|
||||||
|
|
||||||
|
flag = true;
|
||||||
|
|
||||||
|
for (int j = 0; j < listData.size(); j++) {
|
||||||
|
|
||||||
|
PharmaSOSGetterSetter data = listData.get(j);
|
||||||
|
|
||||||
|
String gskFacing = data.getGskFacing();
|
||||||
|
String competitionFacing = data.getCompetitorFacing();
|
||||||
|
|
||||||
|
if(gskFacing==null || gskFacing.equals("")){
|
||||||
|
|
||||||
|
flag = false;
|
||||||
|
Error_Message = getResources().getString(R.string.enter_facing);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
else if (competitionFacing==null || competitionFacing.equals("")) {
|
||||||
|
|
||||||
|
flag = false;
|
||||||
|
Error_Message = getResources().getString(R.string.enter_facing);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
/*if (!child_flag)
|
||||||
|
listTemp.add(data);*/
|
||||||
|
}
|
||||||
|
|
||||||
|
if(flag){
|
||||||
|
checkflag = true;
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
checkflag = false;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* if (!all_flag) {
|
||||||
|
adapter = new ExpandableListAdapter(this, listDataHeaderTemp, listDataChildTemp);
|
||||||
|
expandableListView.setAdapter(adapter);
|
||||||
|
checkflag = false;
|
||||||
|
} else {
|
||||||
|
checkflag = true;
|
||||||
|
}*/
|
||||||
|
|
||||||
|
return checkflag;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,898 @@
|
|||||||
|
package cpm.com.gskmtorange.pharma_stores;
|
||||||
|
|
||||||
|
import android.app.AlertDialog;
|
||||||
|
import android.content.ActivityNotFoundException;
|
||||||
|
import android.content.Context;
|
||||||
|
import android.content.DialogInterface;
|
||||||
|
import android.content.Intent;
|
||||||
|
import android.content.SharedPreferences;
|
||||||
|
import android.content.pm.ApplicationInfo;
|
||||||
|
import android.content.pm.PackageManager;
|
||||||
|
import android.graphics.Typeface;
|
||||||
|
import android.net.Uri;
|
||||||
|
import android.os.Build;
|
||||||
|
import android.os.Bundle;
|
||||||
|
import android.preference.PreferenceManager;
|
||||||
|
import android.provider.MediaStore;
|
||||||
|
import android.support.design.widget.FloatingActionButton;
|
||||||
|
import android.support.v4.app.Fragment;
|
||||||
|
import android.support.v4.content.FileProvider;
|
||||||
|
import android.support.v7.widget.CardView;
|
||||||
|
import android.util.Log;
|
||||||
|
import android.view.LayoutInflater;
|
||||||
|
import android.view.View;
|
||||||
|
import android.view.ViewGroup;
|
||||||
|
import android.view.inputmethod.InputMethodManager;
|
||||||
|
import android.widget.AbsListView;
|
||||||
|
import android.widget.BaseExpandableListAdapter;
|
||||||
|
import android.widget.ExpandableListView;
|
||||||
|
import android.widget.ImageView;
|
||||||
|
import android.widget.LinearLayout;
|
||||||
|
import android.widget.RadioButton;
|
||||||
|
import android.widget.RadioGroup;
|
||||||
|
import android.widget.RelativeLayout;
|
||||||
|
import android.widget.TextView;
|
||||||
|
|
||||||
|
import java.io.File;
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.HashMap;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
import cpm.com.gskmtorange.Database.GSKOrangeDB;
|
||||||
|
import cpm.com.gskmtorange.R;
|
||||||
|
import cpm.com.gskmtorange.constant.CommonFunctions;
|
||||||
|
import cpm.com.gskmtorange.constant.CommonString;
|
||||||
|
import cpm.com.gskmtorange.xmlGetterSetter.ImageGetterSetter;
|
||||||
|
import cpm.com.gskmtorange.xmlGetterSetter.MappingPharmaQuestionGetterSetter;
|
||||||
|
import cpm.com.gskmtorange.xmlGetterSetter.MappingPharmaQuestionGetterSetter;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* A simple {@link Fragment} subclass.
|
||||||
|
* Activities that contain this fragment must implement the
|
||||||
|
* {@link StoreDetailFragment.OnFragmentInteractionListener} interface
|
||||||
|
* to handle interaction events.
|
||||||
|
* Use the {@link StoreDetailFragment#newInstance} factory method to
|
||||||
|
* create an instance of this fragment.
|
||||||
|
*/
|
||||||
|
public class StoreDetailFragment extends Fragment implements View.OnClickListener {
|
||||||
|
// TODO: Rename parameter arguments, choose names that match
|
||||||
|
// the fragment initialization parameters, e.g. ARG_ITEM_NUMBER
|
||||||
|
private static final String CategoryName = "categoryName";
|
||||||
|
private static final String CategoryId = "categoryId";
|
||||||
|
|
||||||
|
// TODO: Rename and change types of parameters
|
||||||
|
private String mParam1;
|
||||||
|
private String mParam2;
|
||||||
|
|
||||||
|
private OnFragmentInteractionListener mListener;
|
||||||
|
|
||||||
|
GSKOrangeDB db;
|
||||||
|
|
||||||
|
String categoryName, categoryId, Error_Message = "";
|
||||||
|
String store_id, visit_date, username, intime, keyAccount_id, class_id, storeType_id, country_id, store_flag_str;
|
||||||
|
boolean isDialogOpen = true;
|
||||||
|
private SharedPreferences preferences;
|
||||||
|
int scrollPosition = 0;
|
||||||
|
|
||||||
|
ExpandableListView expandableListView;
|
||||||
|
ExpandableListAdapter adapter;
|
||||||
|
|
||||||
|
ImageView img_camera1, img_camera2, img_camera3, img_camera4;
|
||||||
|
|
||||||
|
ArrayList<MappingPharmaQuestionGetterSetter> headerDataList;
|
||||||
|
ArrayList<MappingPharmaQuestionGetterSetter> childDataList;
|
||||||
|
//List<MappingPharmaQuestionGetterSetter> hashMapListHeaderData;
|
||||||
|
HashMap<MappingPharmaQuestionGetterSetter, List<MappingPharmaQuestionGetterSetter>> hashMapListChildData;
|
||||||
|
|
||||||
|
List<Integer> checkHeaderArray = new ArrayList<>();
|
||||||
|
boolean checkflag = true;
|
||||||
|
FloatingActionButton fab;
|
||||||
|
boolean editFlag = false;
|
||||||
|
|
||||||
|
String gallery_package = "";
|
||||||
|
Uri outputFileUri;
|
||||||
|
|
||||||
|
String str = CommonString.FILE_PATH, path = "", _pathforcheck = "", pathForCam1 = "", pathForCam2 = "", pathForCam3 = "", pathForCam4 = "";
|
||||||
|
|
||||||
|
int child_position = -1;
|
||||||
|
int group_position = -1;
|
||||||
|
|
||||||
|
ImageGetterSetter imageGetterSetter = new ImageGetterSetter();
|
||||||
|
|
||||||
|
public StoreDetailFragment() {
|
||||||
|
// Required empty public constructor
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Use this factory method to create a new instance of
|
||||||
|
* this fragment using the provided parameters.
|
||||||
|
*
|
||||||
|
* @param param1 Parameter 1.
|
||||||
|
* @param param2 Parameter 2.
|
||||||
|
* @return A new instance of fragment StoreDetailFragment.
|
||||||
|
*/
|
||||||
|
// TODO: Rename and change types and number of parameters
|
||||||
|
public static StoreDetailFragment newInstance(String param1, String param2) {
|
||||||
|
StoreDetailFragment fragment = new StoreDetailFragment();
|
||||||
|
Bundle args = new Bundle();
|
||||||
|
args.putString(CategoryName, param1);
|
||||||
|
args.putString(CategoryId, param2);
|
||||||
|
fragment.setArguments(args);
|
||||||
|
return fragment;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onCreate(Bundle savedInstanceState) {
|
||||||
|
super.onCreate(savedInstanceState);
|
||||||
|
if (getArguments() != null) {
|
||||||
|
categoryName = getArguments().getString(CategoryName);
|
||||||
|
categoryId = getArguments().getString(CategoryId);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public View onCreateView(LayoutInflater inflater, ViewGroup container,
|
||||||
|
Bundle savedInstanceState) {
|
||||||
|
// Inflate the layout for this fragment
|
||||||
|
View view = inflater.inflate(R.layout.fragment_storedetail, container, false);
|
||||||
|
|
||||||
|
expandableListView = (ExpandableListView) view.findViewById(R.id.expandableListView);
|
||||||
|
img_camera1 = (ImageView) view.findViewById(R.id.img_camera1);
|
||||||
|
img_camera2 = (ImageView) view.findViewById(R.id.img_camera2);
|
||||||
|
img_camera3 = (ImageView) view.findViewById(R.id.img_camera3);
|
||||||
|
img_camera4 = (ImageView) view.findViewById(R.id.img_camera4);
|
||||||
|
|
||||||
|
img_camera1.setOnClickListener(this);
|
||||||
|
img_camera2.setOnClickListener(this);
|
||||||
|
img_camera3.setOnClickListener(this);
|
||||||
|
img_camera4.setOnClickListener(this);
|
||||||
|
|
||||||
|
fab = (FloatingActionButton) getActivity().findViewById(R.id.fab);
|
||||||
|
|
||||||
|
preferences = PreferenceManager.getDefaultSharedPreferences(getActivity());
|
||||||
|
CommonFunctions.updateLangResources(getActivity(), preferences.getString(CommonString.KEY_LANGUAGE, ""));
|
||||||
|
store_id = preferences.getString(CommonString.KEY_STORE_ID, null);
|
||||||
|
visit_date = preferences.getString(CommonString.KEY_DATE, null);
|
||||||
|
username = preferences.getString(CommonString.KEY_USERNAME, null);
|
||||||
|
intime = preferences.getString(CommonString.KEY_STORE_IN_TIME, "");
|
||||||
|
keyAccount_id = preferences.getString(CommonString.KEY_KEYACCOUNT_ID, "");
|
||||||
|
class_id = preferences.getString(CommonString.KEY_CLASS_ID, "");
|
||||||
|
storeType_id = preferences.getString(CommonString.KEY_STORETYPE_ID, "");
|
||||||
|
country_id = preferences.getString(CommonString.KEY_COUNTRY_ID, "");
|
||||||
|
store_flag_str = preferences.getString(CommonString.KEY_STORE_FLAG, null);
|
||||||
|
|
||||||
|
expandableListView = (ExpandableListView) view.findViewById(R.id.expandableListView);
|
||||||
|
|
||||||
|
getActivity().setTitle(R.string.store_detail);
|
||||||
|
|
||||||
|
db = new GSKOrangeDB(getActivity());
|
||||||
|
db.open();
|
||||||
|
|
||||||
|
prepareList();
|
||||||
|
|
||||||
|
fab.setOnClickListener(new View.OnClickListener() {
|
||||||
|
@Override
|
||||||
|
public void onClick(View v) {
|
||||||
|
|
||||||
|
if(pathForCam1.equals("") && pathForCam2.equals("") && pathForCam3.equals("") && pathForCam4.equals("")){
|
||||||
|
Error_Message = getResources().getString(R.string.click_image);
|
||||||
|
AlertDialog.Builder builder = new AlertDialog.Builder(getActivity());
|
||||||
|
builder.setMessage(Error_Message)
|
||||||
|
.setCancelable(false)
|
||||||
|
.setPositiveButton(R.string.ok, new DialogInterface.OnClickListener() {
|
||||||
|
public void onClick(DialogInterface dialog, int id) {
|
||||||
|
dialog.dismiss();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
AlertDialog alert = builder.create();
|
||||||
|
alert.show();
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
|
||||||
|
if (validateData(headerDataList, hashMapListChildData)) {
|
||||||
|
|
||||||
|
imageGetterSetter.setImage1(pathForCam1);
|
||||||
|
imageGetterSetter.setImage2(pathForCam2);
|
||||||
|
imageGetterSetter.setImage3(pathForCam3);
|
||||||
|
imageGetterSetter.setImage4(pathForCam4);
|
||||||
|
db.InsertStoreDetailPharma(store_id, headerDataList, hashMapListChildData, imageGetterSetter);
|
||||||
|
onButtonPressed();
|
||||||
|
} else {
|
||||||
|
for (int i = 0; i < adapter.getGroupCount(); i++)
|
||||||
|
expandableListView.expandGroup(i);
|
||||||
|
|
||||||
|
AlertDialog.Builder builder = new AlertDialog.Builder(getActivity());
|
||||||
|
builder.setMessage(Error_Message)
|
||||||
|
.setCancelable(false)
|
||||||
|
.setPositiveButton(R.string.ok, new DialogInterface.OnClickListener() {
|
||||||
|
public void onClick(DialogInterface dialog, int id) {
|
||||||
|
expandableListView.smoothScrollToPosition(scrollPosition);
|
||||||
|
|
||||||
|
dialog.dismiss();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
AlertDialog alert = builder.create();
|
||||||
|
alert.show();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
return view;
|
||||||
|
}
|
||||||
|
|
||||||
|
// TODO: Rename method, update argument and hook method into UI event
|
||||||
|
public void onButtonPressed() {
|
||||||
|
if (mListener != null) {
|
||||||
|
mListener.onFragmentInteraction(getActivity().getSupportFragmentManager().findFragmentById(R.id.fragment));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onAttach(Context context) {
|
||||||
|
super.onAttach(context);
|
||||||
|
if (context instanceof OnFragmentInteractionListener) {
|
||||||
|
mListener = (OnFragmentInteractionListener) context;
|
||||||
|
} else {
|
||||||
|
throw new RuntimeException(context.toString()
|
||||||
|
+ " must implement OnFragmentInteractionListener");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onDetach() {
|
||||||
|
super.onDetach();
|
||||||
|
mListener = null;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onClick(View v) {
|
||||||
|
|
||||||
|
int id = v.getId();
|
||||||
|
switch (id) {
|
||||||
|
|
||||||
|
case R.id.img_camera1:
|
||||||
|
_pathforcheck = "Pharma_MSL_Top_Image_" + store_id + "_" + visit_date.replace("/", "") + "_" +
|
||||||
|
CommonFunctions.getCurrentTimeWithLanguage(getActivity()).replace(":", "") + ".jpg";
|
||||||
|
path = str + _pathforcheck;
|
||||||
|
|
||||||
|
startCameraActivity(1);
|
||||||
|
break;
|
||||||
|
|
||||||
|
case R.id.img_camera2:
|
||||||
|
_pathforcheck = "Pharma_MSL_Top_Image_" + store_id + "_" + visit_date.replace("/", "") + "_" +
|
||||||
|
CommonFunctions.getCurrentTimeWithLanguage(getActivity()).replace(":", "") + ".jpg";
|
||||||
|
path = str + _pathforcheck;
|
||||||
|
|
||||||
|
startCameraActivity(2);
|
||||||
|
break;
|
||||||
|
|
||||||
|
case R.id.img_camera3:
|
||||||
|
_pathforcheck = "Pharma_MSL_Top_Image_" + store_id + "_" + visit_date.replace("/", "") + "_" +
|
||||||
|
CommonFunctions.getCurrentTimeWithLanguage(getActivity()).replace(":", "") + ".jpg";
|
||||||
|
path = str + _pathforcheck;
|
||||||
|
|
||||||
|
startCameraActivity(3);
|
||||||
|
break;
|
||||||
|
|
||||||
|
case R.id.img_camera4:
|
||||||
|
_pathforcheck = "Pharma_MSL_Top_Image_" + store_id + "_" + visit_date.replace("/", "") + "_" +
|
||||||
|
CommonFunctions.getCurrentTimeWithLanguage(getActivity()).replace(":", "") + ".jpg";
|
||||||
|
path = str + _pathforcheck;
|
||||||
|
|
||||||
|
startCameraActivity(4);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This interface must be implemented by activities that contain this
|
||||||
|
* fragment to allow an interaction in this fragment to be communicated
|
||||||
|
* to the activity and potentially other fragments contained in that
|
||||||
|
* activity.
|
||||||
|
* <p>
|
||||||
|
* See the Android Training lesson <a href=
|
||||||
|
* "http://developer.android.com/training/basics/fragments/communicating.html"
|
||||||
|
* >Communicating with Other Fragments</a> for more information.
|
||||||
|
*/
|
||||||
|
public interface OnFragmentInteractionListener {
|
||||||
|
// TODO: Update argument type and name
|
||||||
|
void onFragmentInteraction(Fragment uri);
|
||||||
|
}
|
||||||
|
|
||||||
|
private void prepareList() {
|
||||||
|
try {
|
||||||
|
|
||||||
|
//set image data
|
||||||
|
imageGetterSetter = db.getStoreDetailPharmaImageInsertedData(store_id);
|
||||||
|
|
||||||
|
if(imageGetterSetter.getImage1()!=null && !imageGetterSetter.getImage1().equals("")){
|
||||||
|
pathForCam1 = imageGetterSetter.getImage1();
|
||||||
|
img_camera1.setBackgroundResource(R.mipmap.camera_green);
|
||||||
|
}
|
||||||
|
|
||||||
|
if(imageGetterSetter.getImage2()!=null && !imageGetterSetter.getImage2().equals("")){
|
||||||
|
pathForCam2 = imageGetterSetter.getImage2();
|
||||||
|
img_camera2.setBackgroundResource(R.mipmap.camera_green);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if(imageGetterSetter.getImage3()!=null && !imageGetterSetter.getImage3().equals("")){
|
||||||
|
pathForCam3 = imageGetterSetter.getImage3();
|
||||||
|
img_camera3.setBackgroundResource(R.mipmap.camera_green);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if(imageGetterSetter.getImage4()!=null && !imageGetterSetter.getImage4().equals("")){
|
||||||
|
pathForCam4 = imageGetterSetter.getImage4();
|
||||||
|
img_camera4.setBackgroundResource(R.mipmap.camera_green);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
//set expandable data
|
||||||
|
//hashMapListHeaderData = new ArrayList<>();
|
||||||
|
hashMapListChildData = new HashMap<>();
|
||||||
|
|
||||||
|
//Header
|
||||||
|
headerDataList = db.getStoreDetailPharmaQuestionInsertedData(store_id);
|
||||||
|
//if inserted data not found
|
||||||
|
if (headerDataList.size() == 0) {
|
||||||
|
|
||||||
|
//default question data
|
||||||
|
headerDataList = db.getPharmaQuestionsData();
|
||||||
|
|
||||||
|
for (int i = 0; i < headerDataList.size(); i++) {
|
||||||
|
|
||||||
|
//childDataList = new ArrayList<>();
|
||||||
|
childDataList = db.getPharmaAnswerData(headerDataList.get(i).getQUESTION_ID().get(0));
|
||||||
|
|
||||||
|
hashMapListChildData.put(headerDataList.get(i), childDataList);
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
|
||||||
|
for (int i = 0; i < headerDataList.size(); i++) {
|
||||||
|
|
||||||
|
childDataList = db.getStoreDetailPharmaAnswerInsertedData(store_id, headerDataList.get(i).getQUESTION_ID().get(0));
|
||||||
|
|
||||||
|
hashMapListChildData.put(headerDataList.get(i), childDataList);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
adapter = new ExpandableListAdapter(getActivity(), headerDataList, hashMapListChildData);
|
||||||
|
expandableListView.setAdapter(adapter);
|
||||||
|
|
||||||
|
for (int i = 0; i < adapter.getGroupCount(); i++)
|
||||||
|
expandableListView.expandGroup(i);
|
||||||
|
|
||||||
|
expandableListView.setOnScrollListener(new AbsListView.OnScrollListener() {
|
||||||
|
@Override
|
||||||
|
public void onScroll(AbsListView view, int firstVisibleItem, int visibleItemCount, int totalItemCount) {
|
||||||
|
|
||||||
|
expandableListView.invalidate();
|
||||||
|
|
||||||
|
int lastItem = firstVisibleItem + visibleItemCount;
|
||||||
|
|
||||||
|
if (firstVisibleItem == 0) {
|
||||||
|
fab.show();//setVisibility(View.VISIBLE);
|
||||||
|
} else if (lastItem == totalItemCount) {
|
||||||
|
fab.hide();//setVisibility(View.INVISIBLE);
|
||||||
|
} else {
|
||||||
|
fab.show();//setVisibility(View.VISIBLE);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onScrollStateChanged(AbsListView arg0, int arg1) {
|
||||||
|
InputMethodManager inputManager = (InputMethodManager) getActivity()
|
||||||
|
.getSystemService(Context.INPUT_METHOD_SERVICE);
|
||||||
|
if (getActivity().getCurrentFocus() != null) {
|
||||||
|
inputManager.hideSoftInputFromWindow(getActivity().getCurrentFocus().getWindowToken(), 0);
|
||||||
|
getActivity().getCurrentFocus().clearFocus();
|
||||||
|
}
|
||||||
|
|
||||||
|
expandableListView.invalidateViews();
|
||||||
|
//adapter.notifyDataSetChanged();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
// Listview Group click listener
|
||||||
|
expandableListView.setOnGroupClickListener(new ExpandableListView.OnGroupClickListener() {
|
||||||
|
@Override
|
||||||
|
public boolean onGroupClick(ExpandableListView parent, View v, int groupPosition, long id) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
// Listview Group expanded listener
|
||||||
|
expandableListView.setOnGroupExpandListener(new ExpandableListView.OnGroupExpandListener() {
|
||||||
|
@Override
|
||||||
|
public void onGroupExpand(int groupPosition) {
|
||||||
|
InputMethodManager inputManager = (InputMethodManager) getActivity()
|
||||||
|
.getSystemService(Context.INPUT_METHOD_SERVICE);
|
||||||
|
if (getActivity().getWindow().getCurrentFocus() != null) {
|
||||||
|
inputManager.hideSoftInputFromWindow(getActivity().getCurrentFocus().getWindowToken(), 0);
|
||||||
|
getActivity().getCurrentFocus().clearFocus();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
// Listview Group collasped listener
|
||||||
|
expandableListView.setOnGroupCollapseListener(new ExpandableListView.OnGroupCollapseListener() {
|
||||||
|
@Override
|
||||||
|
public void onGroupCollapse(int groupPosition) {
|
||||||
|
InputMethodManager inputManager = (InputMethodManager) getActivity().getApplicationContext()
|
||||||
|
.getSystemService(Context.INPUT_METHOD_SERVICE);
|
||||||
|
if (getActivity().getWindow().getCurrentFocus() != null) {
|
||||||
|
inputManager.hideSoftInputFromWindow(getActivity().getCurrentFocus().getWindowToken(), 0);
|
||||||
|
getActivity().getCurrentFocus().clearFocus();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
// Listview on child click listener
|
||||||
|
expandableListView.setOnChildClickListener(new ExpandableListView.OnChildClickListener() {
|
||||||
|
@Override
|
||||||
|
public boolean onChildClick(ExpandableListView parent, View v, int groupPosition,
|
||||||
|
int childPosition, long id) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
} catch (Exception e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public class ExpandableListAdapter extends BaseExpandableListAdapter {
|
||||||
|
private Context _context;
|
||||||
|
private List<MappingPharmaQuestionGetterSetter> _listDataHeader;
|
||||||
|
private HashMap<MappingPharmaQuestionGetterSetter, List<MappingPharmaQuestionGetterSetter>> _listDataChild;
|
||||||
|
|
||||||
|
public ExpandableListAdapter(Context context, List<MappingPharmaQuestionGetterSetter> listDataHeader,
|
||||||
|
HashMap<MappingPharmaQuestionGetterSetter, List<MappingPharmaQuestionGetterSetter>> listChildData) {
|
||||||
|
this._context = context;
|
||||||
|
this._listDataHeader = listDataHeader;
|
||||||
|
this._listDataChild = listChildData;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Object getGroup(int groupPosition) {
|
||||||
|
return this._listDataHeader.get(groupPosition);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int getGroupCount() {
|
||||||
|
return this._listDataHeader.size();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public long getGroupId(int groupPosition) {
|
||||||
|
return groupPosition;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public View getGroupView(final int groupPosition, boolean isExpanded, View convertView, ViewGroup parent) {
|
||||||
|
MappingPharmaQuestionGetterSetter headerTitle = (MappingPharmaQuestionGetterSetter) getGroup(groupPosition);
|
||||||
|
|
||||||
|
if (convertView == null) {
|
||||||
|
LayoutInflater infalInflater = (LayoutInflater) this._context.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
|
||||||
|
convertView = infalInflater.inflate(R.layout.item_msl_availability_stock_facing_header, null, false);
|
||||||
|
}
|
||||||
|
|
||||||
|
TextView txt_categoryHeader = (TextView) convertView.findViewById(R.id.txt_categoryHeader);
|
||||||
|
RelativeLayout rel_header = (RelativeLayout) convertView.findViewById(R.id.rel_categoryHeader);
|
||||||
|
ImageView img_camera = (ImageView) convertView.findViewById(R.id.img_camera);
|
||||||
|
CardView card_view = (CardView) convertView.findViewById(R.id.card_view);
|
||||||
|
|
||||||
|
txt_categoryHeader.setTypeface(null, Typeface.BOLD);
|
||||||
|
|
||||||
|
txt_categoryHeader.setText(headerTitle.getQUESTION().get(0));
|
||||||
|
|
||||||
|
|
||||||
|
if (!checkflag) {
|
||||||
|
if (checkHeaderArray.contains(groupPosition)) {
|
||||||
|
card_view.setCardBackgroundColor(getResources().getColor(android.R.color.holo_red_dark));
|
||||||
|
} else {
|
||||||
|
card_view.setCardBackgroundColor(getResources().getColor(R.color.grey_background));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
//empty check color change
|
||||||
|
/*if (headerTitle.getCompany_id().equals("1")) {
|
||||||
|
if (!checkflag) {
|
||||||
|
if (checkHeaderArray.contains(groupPosition)) {
|
||||||
|
//card_view.setCardBackgroundColor(getResources().getColor(android.R.color.holo_red_dark));
|
||||||
|
txt_categoryHeader.setTextColor(getResources().getColor(android.R.color.holo_red_dark));
|
||||||
|
} else {
|
||||||
|
txt_categoryHeader.setTextColor(getResources().getColor(R.color.colorPrimaryDark));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
if (!checkflag) {
|
||||||
|
if (checkHeaderArray.contains(groupPosition)) {
|
||||||
|
txt_categoryHeader.setTextColor(getResources().getColor(android.R.color.holo_red_dark));
|
||||||
|
} else {
|
||||||
|
txt_categoryHeader.setTextColor(getResources().getColor(R.color.black));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}*/
|
||||||
|
|
||||||
|
return convertView;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Object getChild(int groupPosition, int childPosititon) {
|
||||||
|
return this._listDataChild.get(this._listDataHeader.get(groupPosition)).get(childPosititon);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int getChildrenCount(int groupPosition) {
|
||||||
|
return this._listDataChild.get(this._listDataHeader.get(groupPosition)).size();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public long getChildId(int groupPosition, int childPosition) {
|
||||||
|
return childPosition;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public View getChildView(final int groupPosition, final int childPosition, boolean isLastChild,
|
||||||
|
View convertView, ViewGroup parent) {
|
||||||
|
|
||||||
|
final MappingPharmaQuestionGetterSetter childData =
|
||||||
|
(MappingPharmaQuestionGetterSetter) getChild(groupPosition, childPosition);
|
||||||
|
ViewHolder holder = null;
|
||||||
|
|
||||||
|
if (convertView == null) {
|
||||||
|
LayoutInflater infalInflater = (LayoutInflater) this._context.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
|
||||||
|
convertView = infalInflater.inflate(R.layout.pharma_msl_item, null, false);
|
||||||
|
|
||||||
|
holder = new ViewHolder();
|
||||||
|
holder.cardView = (CardView) convertView.findViewById(R.id.card_view);
|
||||||
|
holder.lin_category = (LinearLayout) convertView.findViewById(R.id.lin_category);
|
||||||
|
|
||||||
|
holder.txt_skuName = (TextView) convertView.findViewById(R.id.txt_skuName);
|
||||||
|
|
||||||
|
holder.rg = (RadioGroup) convertView.findViewById(R.id.radio_group);
|
||||||
|
holder.radio_yes = (RadioButton) convertView.findViewById(R.id.radio_yes);
|
||||||
|
holder.radio_no = (RadioButton) convertView.findViewById(R.id.radio_no);
|
||||||
|
holder.img_cam = (ImageView) convertView.findViewById(R.id.img_cam);
|
||||||
|
|
||||||
|
convertView.setTag(holder);
|
||||||
|
} else {
|
||||||
|
holder = (ViewHolder) convertView.getTag();
|
||||||
|
}
|
||||||
|
|
||||||
|
holder.txt_skuName.setText(childData.getSUB_CATEGORY().get(0) + " - " + childData.getBRAND().get(0));
|
||||||
|
|
||||||
|
holder.txt_skuName.setTextColor(getResources().getColor(R.color.black));
|
||||||
|
|
||||||
|
|
||||||
|
final ViewHolder finalHolder1 = holder;
|
||||||
|
holder.rg.setOnCheckedChangeListener(new RadioGroup.OnCheckedChangeListener() {
|
||||||
|
@Override
|
||||||
|
public void onCheckedChanged(RadioGroup group, int checkedId) {
|
||||||
|
if (finalHolder1.radio_yes.isChecked()) {
|
||||||
|
|
||||||
|
finalHolder1.radio_yes.setBackground(getActivity().getResources().getDrawable(R.mipmap.yes_green));
|
||||||
|
finalHolder1.radio_no.setBackground(getActivity().getResources().getDrawable(R.mipmap.no_white));
|
||||||
|
finalHolder1.img_cam.setVisibility(View.VISIBLE);
|
||||||
|
|
||||||
|
childData.setIsChecked(1);
|
||||||
|
//adapter.notifyDataSetChanged();
|
||||||
|
}
|
||||||
|
if (finalHolder1.radio_no.isChecked()) {
|
||||||
|
|
||||||
|
finalHolder1.radio_no.setBackground(getActivity().getResources().getDrawable(R.mipmap.no_red));
|
||||||
|
finalHolder1.radio_yes.setBackground(getActivity().getResources().getDrawable(R.mipmap.yes_white));
|
||||||
|
finalHolder1.img_cam.setVisibility(View.GONE);
|
||||||
|
|
||||||
|
childData.setIsChecked(0);
|
||||||
|
//adapter.notifyDataSetChanged();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
//Camera
|
||||||
|
holder.img_cam.setOnClickListener(new View.OnClickListener() {
|
||||||
|
@Override
|
||||||
|
public void onClick(View v) {
|
||||||
|
_pathforcheck = "Pharma_MSL_Image_" + store_id + "_" + childData.getBRAND_ID().get(0) + visit_date.replace("/", "") + "_" +
|
||||||
|
CommonFunctions.getCurrentTimeWithLanguage(getActivity()).replace(":", "") + ".jpg";
|
||||||
|
child_position = childPosition;
|
||||||
|
group_position = groupPosition;
|
||||||
|
path = str + _pathforcheck;
|
||||||
|
|
||||||
|
startCameraActivity(5);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
|
if (childData.getIsChecked() == 1) {
|
||||||
|
holder.radio_yes.setBackground(getActivity().getResources().getDrawable(R.mipmap.yes_green));
|
||||||
|
holder.radio_no.setBackground(getActivity().getResources().getDrawable(R.mipmap.no_white));
|
||||||
|
holder.img_cam.setVisibility(View.VISIBLE);
|
||||||
|
holder.radio_yes.setChecked(true);
|
||||||
|
//notifyDataSetChanged();
|
||||||
|
} else if (childData.getIsChecked() == 0) {
|
||||||
|
holder.radio_yes.setBackground(getActivity().getResources().getDrawable(R.mipmap.yes_white));
|
||||||
|
holder.radio_no.setBackground(getActivity().getResources().getDrawable(R.mipmap.no_red));
|
||||||
|
holder.img_cam.setVisibility(View.GONE);
|
||||||
|
holder.radio_no.setChecked(true);
|
||||||
|
//notifyDataSetChanged();
|
||||||
|
} else {
|
||||||
|
holder.radio_yes.setBackground(getActivity().getResources().getDrawable(R.mipmap.yes_white));
|
||||||
|
holder.radio_no.setBackground(getActivity().getResources().getDrawable(R.mipmap.no_white));
|
||||||
|
holder.img_cam.setVisibility(View.GONE);
|
||||||
|
holder.rg.clearCheck();
|
||||||
|
//notifyDataSetChanged();
|
||||||
|
}
|
||||||
|
|
||||||
|
if (childData.getImgPath().equals("")) {
|
||||||
|
holder.img_cam.setBackgroundResource(R.mipmap.camera_orange);
|
||||||
|
} else {
|
||||||
|
holder.img_cam.setBackgroundResource(R.mipmap.camera_green);
|
||||||
|
}
|
||||||
|
|
||||||
|
//empty check color change
|
||||||
|
if (!checkflag) {
|
||||||
|
boolean tempflag = false;
|
||||||
|
|
||||||
|
/* if (holder.facing.getText().toString().equals("")) {
|
||||||
|
holder.facing.setBackgroundColor(getResources().getColor(R.color.white));
|
||||||
|
holder.facing.setHintTextColor(getResources().getColor(android.R.color.holo_red_dark));
|
||||||
|
holder.facing.setHint(getString(R.string.empty));
|
||||||
|
tempflag = true;
|
||||||
|
}*/
|
||||||
|
|
||||||
|
|
||||||
|
if (tempflag) {
|
||||||
|
//holder.cardView.setCardBackgroundColor(getResources().getColor(android.R.color.holo_red_dark));
|
||||||
|
holder.lin_category.setBackgroundColor(getResources().getColor(android.R.color.holo_red_dark));
|
||||||
|
} else {
|
||||||
|
//holder.cardView.setCardBackgroundColor(getResources().getColor(R.color.white));
|
||||||
|
holder.lin_category.setBackgroundColor(getResources().getColor(R.color.white));
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
return convertView;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean hasStableIds() {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean isChildSelectable(int groupPosition, int childPosition) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public class ViewHolder {
|
||||||
|
CardView cardView;
|
||||||
|
TextView txt_skuName;
|
||||||
|
LinearLayout lin_category;
|
||||||
|
RadioGroup rg;
|
||||||
|
RadioButton radio_yes;
|
||||||
|
RadioButton radio_no;
|
||||||
|
ImageView img_cam;
|
||||||
|
}
|
||||||
|
|
||||||
|
private void startCameraActivity(int pos) {
|
||||||
|
try {
|
||||||
|
|
||||||
|
Log.i("Stock & Facing ", "startCameraActivity()");
|
||||||
|
File file = new File(path);
|
||||||
|
outputFileUri = FileProvider.getUriForFile(getActivity(), "cpm.com.gskmtorange.fileprovider", file);
|
||||||
|
|
||||||
|
String defaultCameraPackage = "";
|
||||||
|
final PackageManager packageManager = getActivity().getPackageManager();
|
||||||
|
List<ApplicationInfo> list = packageManager.getInstalledApplications(PackageManager.GET_UNINSTALLED_PACKAGES);
|
||||||
|
for (int n = 0; n < list.size(); n++) {
|
||||||
|
if ((list.get(n).flags & ApplicationInfo.FLAG_SYSTEM) == 1) {
|
||||||
|
/* Log.e("TAG", "Installed Applications : " + list.get(n).loadLabel(packageManager).toString());
|
||||||
|
Log.e("TAG", "package name : " + list.get(n).packageName);*/
|
||||||
|
|
||||||
|
//temp value in case camera is gallery app above jellybean
|
||||||
|
String packag = list.get(n).loadLabel(packageManager).toString();
|
||||||
|
if (packag.equalsIgnoreCase("Gallery") || packag.equalsIgnoreCase("Galeri") || packag.equalsIgnoreCase("الاستوديو")) {
|
||||||
|
gallery_package = list.get(n).packageName;
|
||||||
|
}
|
||||||
|
|
||||||
|
boolean b = packag.equalsIgnoreCase("Camera") || packag.equalsIgnoreCase("Kamera") || packag.equalsIgnoreCase("الكاميرا");
|
||||||
|
if (android.os.Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT) {
|
||||||
|
if (b) {
|
||||||
|
defaultCameraPackage = list.get(n).packageName;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
|
||||||
|
if (b) {
|
||||||
|
|
||||||
|
defaultCameraPackage = list.get(n).packageName;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
Intent intent = new Intent(MediaStore.ACTION_IMAGE_CAPTURE);
|
||||||
|
intent.putExtra(MediaStore.EXTRA_OUTPUT, outputFileUri);
|
||||||
|
intent.setPackage(defaultCameraPackage);
|
||||||
|
//startActivityForResult(intent, 1);
|
||||||
|
startActivityForResult(intent, pos);
|
||||||
|
//startActivityForResult(intent, position);
|
||||||
|
|
||||||
|
} catch (ActivityNotFoundException e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
|
||||||
|
Intent intent = new Intent(MediaStore.ACTION_IMAGE_CAPTURE);
|
||||||
|
intent.putExtra(MediaStore.EXTRA_OUTPUT, outputFileUri);
|
||||||
|
intent.setPackage(gallery_package);
|
||||||
|
//startActivityForResult(intent, 0);
|
||||||
|
startActivityForResult(intent, pos);
|
||||||
|
|
||||||
|
} catch (Exception e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onActivityResult(int requestCode, int resultCode, Intent data) {
|
||||||
|
Log.e("Stock & Facing", "resultCode: " + resultCode + " requestCode: " + requestCode);
|
||||||
|
/*switch (resultCode) {
|
||||||
|
case 0:
|
||||||
|
Log.e("Stock & Facing", "User cancelled");
|
||||||
|
|
||||||
|
break;
|
||||||
|
case -1:
|
||||||
|
if (_pathforcheck != null && !_pathforcheck.equals("")) {
|
||||||
|
if (new File(str + _pathforcheck).exists()) {
|
||||||
|
img = _pathforcheck;
|
||||||
|
t2PAdapter.notifyDataSetChanged();
|
||||||
|
_pathforcheck = "";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}*/
|
||||||
|
|
||||||
|
switch (resultCode) {
|
||||||
|
|
||||||
|
case 0:
|
||||||
|
Log.e("Stock & Facing", "User cancelled");
|
||||||
|
break;
|
||||||
|
|
||||||
|
case -1:
|
||||||
|
|
||||||
|
if (_pathforcheck != null && !_pathforcheck.equals("")) {
|
||||||
|
if (new File(str + _pathforcheck).exists()) {
|
||||||
|
|
||||||
|
switch (requestCode) {
|
||||||
|
|
||||||
|
case 1:
|
||||||
|
pathForCam1 = _pathforcheck;
|
||||||
|
_pathforcheck = "";
|
||||||
|
img_camera1.setBackgroundResource(R.mipmap.camera_green);
|
||||||
|
break;
|
||||||
|
|
||||||
|
case 2:
|
||||||
|
pathForCam2 = _pathforcheck;
|
||||||
|
_pathforcheck = "";
|
||||||
|
img_camera2.setBackgroundResource(R.mipmap.camera_green);
|
||||||
|
break;
|
||||||
|
|
||||||
|
case 3:
|
||||||
|
pathForCam3 = _pathforcheck;
|
||||||
|
_pathforcheck = "";
|
||||||
|
img_camera3.setBackgroundResource(R.mipmap.camera_green);
|
||||||
|
break;
|
||||||
|
|
||||||
|
case 4:
|
||||||
|
pathForCam4 = _pathforcheck;
|
||||||
|
_pathforcheck = "";
|
||||||
|
img_camera4.setBackgroundResource(R.mipmap.camera_green);
|
||||||
|
break;
|
||||||
|
|
||||||
|
default:
|
||||||
|
if (_pathforcheck != null && !_pathforcheck.equals("")) {
|
||||||
|
if (new File(str + _pathforcheck).exists()) {
|
||||||
|
|
||||||
|
hashMapListChildData.get(headerDataList.get(group_position)).get(child_position).setImgPath(_pathforcheck);
|
||||||
|
|
||||||
|
expandableListView.invalidateViews();
|
||||||
|
adapter.notifyDataSetChanged();
|
||||||
|
_pathforcheck = "";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
super.onActivityResult(requestCode, resultCode, data);
|
||||||
|
}
|
||||||
|
|
||||||
|
boolean validateData(List<MappingPharmaQuestionGetterSetter> listDataHeader,
|
||||||
|
HashMap<MappingPharmaQuestionGetterSetter, List<MappingPharmaQuestionGetterSetter>> listDataChild) {
|
||||||
|
boolean flag = true, child_flag = true, all_flag = true;
|
||||||
|
|
||||||
|
checkHeaderArray.clear();
|
||||||
|
int childCount = 0;
|
||||||
|
|
||||||
|
//temp list data for empty only
|
||||||
|
List<MappingPharmaQuestionGetterSetter> listDataHeaderTemp = new ArrayList<>();
|
||||||
|
|
||||||
|
HashMap<MappingPharmaQuestionGetterSetter, List<MappingPharmaQuestionGetterSetter>> listDataChildTemp = new HashMap<>();
|
||||||
|
|
||||||
|
|
||||||
|
for (int i = 0; i < listDataHeader.size(); i++) {
|
||||||
|
flag = true;
|
||||||
|
|
||||||
|
List<MappingPharmaQuestionGetterSetter> listTemp = new ArrayList<>();
|
||||||
|
|
||||||
|
for (int j = 0; j < listDataChild.get(listDataHeader.get(i)).size(); j++) {
|
||||||
|
|
||||||
|
child_flag = true;
|
||||||
|
|
||||||
|
MappingPharmaQuestionGetterSetter data = listDataChild.get(listDataHeader.get(i)).get(j);
|
||||||
|
|
||||||
|
int isChecked = data.getIsChecked();
|
||||||
|
String imgPath = data.getImgPath();
|
||||||
|
|
||||||
|
if (isChecked == -1) {
|
||||||
|
|
||||||
|
scrollPosition = i + j + childCount;
|
||||||
|
|
||||||
|
flag = false;
|
||||||
|
Error_Message = getResources().getString(R.string.msg_select_present);
|
||||||
|
break;
|
||||||
|
} else if (isChecked == 1) {
|
||||||
|
|
||||||
|
if (imgPath == null || imgPath.equals("")) {
|
||||||
|
|
||||||
|
scrollPosition = i + j + childCount;
|
||||||
|
|
||||||
|
flag = false;
|
||||||
|
Error_Message = getResources().getString(R.string.click_image);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
/*if (!child_flag)
|
||||||
|
listTemp.add(data);*/
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
if (flag == false) {
|
||||||
|
//checkflag = false;
|
||||||
|
/* listDataHeaderTemp.add(listDataHeader.get(i));
|
||||||
|
listDataChildTemp.put(listDataHeader.get(i), listTemp);*/
|
||||||
|
|
||||||
|
if (!checkHeaderArray.contains(i)) {
|
||||||
|
checkHeaderArray.add(i);
|
||||||
|
}
|
||||||
|
checkflag = false;
|
||||||
|
break;
|
||||||
|
} else {
|
||||||
|
childCount = childCount + listDataChild.get(listDataHeader.get(i)).size();
|
||||||
|
checkflag = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/* if (!all_flag) {
|
||||||
|
adapter = new ExpandableListAdapter(this, listDataHeaderTemp, listDataChildTemp);
|
||||||
|
expandableListView.setAdapter(adapter);
|
||||||
|
checkflag = false;
|
||||||
|
} else {
|
||||||
|
checkflag = true;
|
||||||
|
}*/
|
||||||
|
|
||||||
|
return checkflag;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -460,7 +460,7 @@ public class StoreRouteActivity extends FragmentActivity implements OnMapReadyCa
|
|||||||
|
|
||||||
// Adding all the points in the route to LineOptions
|
// Adding all the points in the route to LineOptions
|
||||||
lineOptions.addAll(points);
|
lineOptions.addAll(points);
|
||||||
lineOptions.width(15);
|
lineOptions.width(12);
|
||||||
lineOptions.color(Color.parseColor("#5ac614"));
|
lineOptions.color(Color.parseColor("#5ac614"));
|
||||||
|
|
||||||
Log.d("onPostExecute","onPostExecute lineoptions decoded");
|
Log.d("onPostExecute","onPostExecute lineoptions decoded");
|
||||||
|
|||||||
@@ -309,6 +309,16 @@ public class PreviousDataUploadActivity extends AppCompatActivity {
|
|||||||
adhoc = "0";
|
adhoc = "0";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
String coverage_service, status_service;
|
||||||
|
|
||||||
|
if(coverageList.get(i).getFlag_from().equals(CommonString.FROM_ADDITIONAL)){
|
||||||
|
status_service = CommonString.METHOD_UPLOAD_COVERAGE_STATUS_ADDITIONAL;
|
||||||
|
coverage_service = CommonString.METHOD_UPLOAD_COVERAGE_NEW_ADDITIONAL;
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
status_service = CommonString.METHOD_UPLOAD_COVERAGE_STATUS;
|
||||||
|
coverage_service = CommonString.METHOD_UPLOAD_COVERAGE_NEW;
|
||||||
|
}
|
||||||
|
|
||||||
String sub_reason_id = coverageList.get(i).getSub_reasonId();
|
String sub_reason_id = coverageList.get(i).getSub_reasonId();
|
||||||
if (sub_reason_id!=null && sub_reason_id.equals("")) {
|
if (sub_reason_id!=null && sub_reason_id.equals("")) {
|
||||||
@@ -336,7 +346,7 @@ public class PreviousDataUploadActivity extends AppCompatActivity {
|
|||||||
+ "[/USER_DATA]"
|
+ "[/USER_DATA]"
|
||||||
+ "[/DATA]";
|
+ "[/DATA]";
|
||||||
|
|
||||||
SoapObject request = new SoapObject(CommonString.NAMESPACE, CommonString.METHOD_UPLOAD_COVERAGE);
|
SoapObject request = new SoapObject(CommonString.NAMESPACE, coverage_service);
|
||||||
request.addProperty("onXML", onXML);
|
request.addProperty("onXML", onXML);
|
||||||
|
|
||||||
SoapSerializationEnvelope envelope = new SoapSerializationEnvelope(SoapEnvelope.VER11);
|
SoapSerializationEnvelope envelope = new SoapSerializationEnvelope(SoapEnvelope.VER11);
|
||||||
@@ -344,7 +354,7 @@ public class PreviousDataUploadActivity extends AppCompatActivity {
|
|||||||
envelope.setOutputSoapObject(request);
|
envelope.setOutputSoapObject(request);
|
||||||
|
|
||||||
HttpTransportSE androidHttpTransport = new HttpTransportSE(CommonString.URL);
|
HttpTransportSE androidHttpTransport = new HttpTransportSE(CommonString.URL);
|
||||||
androidHttpTransport.call(CommonString.SOAP_ACTION_UPLOAD_STORE_COVERAGE, envelope);
|
androidHttpTransport.call(CommonString.SOAP_ACTION + coverage_service, envelope);
|
||||||
|
|
||||||
result = envelope.getResponse();
|
result = envelope.getResponse();
|
||||||
|
|
||||||
@@ -493,16 +503,16 @@ public class PreviousDataUploadActivity extends AppCompatActivity {
|
|||||||
} else {
|
} else {
|
||||||
stock = "0";
|
stock = "0";
|
||||||
}
|
}
|
||||||
onXML = "[MSL_AVAILABILITY_STOCK_FACING_DATA_NEW]"
|
onXML = "[ST]"
|
||||||
+ "[MID]" + mid + "[/MID]"
|
+ "[MID]" + mid + "[/MID]"
|
||||||
+ "[USER_ID]" + userId + "[/USER_ID]"
|
//+ "[USERID]" + userId + "[/USERID]"
|
||||||
+ "[SKU_ID]" + Integer.parseInt(msl_availabilityStockFacingList.get(j).getSku_id()) + "[/SKU_ID]"
|
+ "[SKID]" + Integer.parseInt(msl_availabilityStockFacingList.get(j).getSku_id()) + "[/SKID]"
|
||||||
+ "[MBQ]" + Integer.parseInt(msl_availabilityStockFacingList.get(j).getMbq()) + "[/MBQ]"
|
+ "[MBQ]" + Integer.parseInt(msl_availabilityStockFacingList.get(j).getMbq()) + "[/MBQ]"
|
||||||
+ "[AVAILABILITY]" + Integer.parseInt(msl_availabilityStockFacingList.get(j).getToggleValue()) + "[/AVAILABILITY]"
|
+ "[AVL]" + Integer.parseInt(msl_availabilityStockFacingList.get(j).getToggleValue()) + "[/AVL]"
|
||||||
+ "[FACING]" + Double.parseDouble(msl_availabilityStockFacingList.get(j).getFacing()) + "[/FACING]"
|
+ "[FC]" + Double.parseDouble(msl_availabilityStockFacingList.get(j).getFacing()) + "[/FC]"
|
||||||
+ "[STOCK]" + Integer.parseInt(stock) + "[/STOCK]"
|
+ "[SK]" + Integer.parseInt(stock) + "[/SK]"
|
||||||
+ "[MUST_HAVE]" + Integer.parseInt(msl_availabilityStockFacingList.get(j).getMust_have()) + "[/MUST_HAVE]" +
|
+ "[ML]" + Integer.parseInt(msl_availabilityStockFacingList.get(j).getMust_have()) + "[/ML]" +
|
||||||
"[/MSL_AVAILABILITY_STOCK_FACING_DATA_NEW]";
|
"[/ST]";
|
||||||
|
|
||||||
mslAvailability_stockFacing_xml = mslAvailability_stockFacing_xml + onXML;
|
mslAvailability_stockFacing_xml = mslAvailability_stockFacing_xml + onXML;
|
||||||
}
|
}
|
||||||
@@ -512,7 +522,7 @@ public class PreviousDataUploadActivity extends AppCompatActivity {
|
|||||||
|
|
||||||
request = new SoapObject(CommonString.NAMESPACE, CommonString.METHOD_UPLOAD_STOCK_XML_DATA);
|
request = new SoapObject(CommonString.NAMESPACE, CommonString.METHOD_UPLOAD_STOCK_XML_DATA);
|
||||||
request.addProperty("XMLDATA", sos_xml);
|
request.addProperty("XMLDATA", sos_xml);
|
||||||
request.addProperty("KEYS", "STOCK_AVAILABILITY_POINT");
|
request.addProperty("KEYS", "STOCK_AVAILABILITY_POINT_LATEST");
|
||||||
request.addProperty("USERNAME", userId);
|
request.addProperty("USERNAME", userId);
|
||||||
request.addProperty("MID", mid);
|
request.addProperty("MID", mid);
|
||||||
|
|
||||||
@@ -1866,7 +1876,7 @@ public class PreviousDataUploadActivity extends AppCompatActivity {
|
|||||||
|
|
||||||
final String sos_xml = "[DATA]" + final_xml + "[/DATA]";
|
final String sos_xml = "[DATA]" + final_xml + "[/DATA]";
|
||||||
|
|
||||||
request = new SoapObject(CommonString.NAMESPACE, CommonString.METHOD_UPLOAD_COVERAGE_STATUS);
|
request = new SoapObject(CommonString.NAMESPACE, status_service);
|
||||||
request.addProperty("onXML", sos_xml);
|
request.addProperty("onXML", sos_xml);
|
||||||
|
|
||||||
envelope = new SoapSerializationEnvelope(SoapEnvelope.VER11);
|
envelope = new SoapSerializationEnvelope(SoapEnvelope.VER11);
|
||||||
@@ -1874,7 +1884,7 @@ public class PreviousDataUploadActivity extends AppCompatActivity {
|
|||||||
envelope.setOutputSoapObject(request);
|
envelope.setOutputSoapObject(request);
|
||||||
|
|
||||||
androidHttpTransport = new HttpTransportSE(CommonString.URL);
|
androidHttpTransport = new HttpTransportSE(CommonString.URL);
|
||||||
androidHttpTransport.call(CommonString.SOAP_ACTION + CommonString.METHOD_UPLOAD_COVERAGE_STATUS, envelope);
|
androidHttpTransport.call(CommonString.SOAP_ACTION + status_service, envelope);
|
||||||
|
|
||||||
result = envelope.getResponse();
|
result = envelope.getResponse();
|
||||||
|
|
||||||
|
|||||||
@@ -65,7 +65,7 @@ public class UploadImageWithRetrofit {
|
|||||||
int storeId = 0;
|
int storeId = 0;
|
||||||
GSKOrangeDB db;
|
GSKOrangeDB db;
|
||||||
ProgressDialog pd;
|
ProgressDialog pd;
|
||||||
ArrayList<StoreBean> storeList, storeList_deviation;
|
ArrayList<StoreBean> storeList, storeList_deviation, storeListAdditional, storeListPharma;
|
||||||
private int factor, k = 0;
|
private int factor, k = 0;
|
||||||
Data data;
|
Data data;
|
||||||
|
|
||||||
@@ -237,6 +237,8 @@ public class UploadImageWithRetrofit {
|
|||||||
foldername = "CoachingVisits";
|
foldername = "CoachingVisits";
|
||||||
} else if (file[i].getName().contains("DeliveryCalls")) {
|
} else if (file[i].getName().contains("DeliveryCalls")) {
|
||||||
foldername = "DeliveryCallsImages";
|
foldername = "DeliveryCallsImages";
|
||||||
|
} else if (file[i].getName().contains("CounterfeitProduct")) {//added 15.04.2019
|
||||||
|
foldername = "CounterFeitImages";
|
||||||
} else{
|
} else{
|
||||||
foldername = "Bulkimages";
|
foldername = "Bulkimages";
|
||||||
}
|
}
|
||||||
@@ -600,6 +602,115 @@ public class UploadImageWithRetrofit {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//for Turkey Pharma Stores
|
||||||
|
storeListPharma = db.getStoreData(visitDate, CommonString.KEY_JOURNEY_PLAN_PHARMA);
|
||||||
|
for (int i = 0; i < storeListPharma.size(); i++) {
|
||||||
|
if (storeListPharma.get(i).getUPLOAD_STATUS().equalsIgnoreCase(CommonString.KEY_D)) {
|
||||||
|
// SET COVERAGE STATUS
|
||||||
|
String final_xml = "";
|
||||||
|
String onXML = "";
|
||||||
|
onXML = "[COVERAGE_STATUS]"
|
||||||
|
+ "[STORE_ID]" + storeListPharma.get(i).getSTORE_ID() + "[/STORE_ID]"
|
||||||
|
+ "[VISIT_DATE]" + storeListPharma.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_PHARMA);
|
||||||
|
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_PHARMA, 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();
|
||||||
|
|
||||||
|
final CoverageBean coverageObj = db.getCoverageSpecificData(storeListPharma.get(i).getVISIT_DATE(), storeListPharma.get(i).getSTORE_ID());
|
||||||
|
|
||||||
|
String uploadStatus;
|
||||||
|
if(coverageObj.getReasonid().equalsIgnoreCase("0")){
|
||||||
|
uploadStatus = CommonString.KEY_U;
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
uploadStatus = CommonString.KEY_UN;
|
||||||
|
}
|
||||||
|
|
||||||
|
db.updateCoverageStatus(storeListPharma.get(i).getSTORE_ID(), uploadStatus);
|
||||||
|
db.updateStoreStatusOnLeave(storeListPharma.get(i).getSTORE_ID(), storeList.get(i).getVISIT_DATE(),
|
||||||
|
uploadStatus, CommonString.FROM_PHARMA);
|
||||||
|
|
||||||
|
db.deleteTableWithStoreID(storeListPharma.get(i).getSTORE_ID());
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
//Additional Stores Egypt
|
||||||
|
storeListAdditional = db.getStoreData(visitDate, CommonString.KEY_JOURNEY_PLAN_ADDITIONAL);
|
||||||
|
for (int i = 0; i < storeListAdditional.size(); i++) {
|
||||||
|
if (storeListAdditional.get(i).getUPLOAD_STATUS().equalsIgnoreCase(CommonString.KEY_D)) {
|
||||||
|
// SET COVERAGE STATUS
|
||||||
|
String final_xml = "";
|
||||||
|
String onXML = "";
|
||||||
|
onXML = "[COVERAGE_STATUS]"
|
||||||
|
+ "[STORE_ID]" + storeListAdditional.get(i).getSTORE_ID() + "[/STORE_ID]"
|
||||||
|
+ "[VISIT_DATE]" + storeListAdditional.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_ADDITIONAL);
|
||||||
|
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_ADDITIONAL, 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();
|
||||||
|
|
||||||
|
final CoverageBean coverageObj = db.getCoverageSpecificData(storeListAdditional.get(i).getVISIT_DATE(), storeListAdditional.get(i).getSTORE_ID());
|
||||||
|
|
||||||
|
String uploadStatus;
|
||||||
|
if(coverageObj.getReasonid().equalsIgnoreCase("0")){
|
||||||
|
uploadStatus = CommonString.KEY_U;
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
uploadStatus = CommonString.KEY_UN;
|
||||||
|
}
|
||||||
|
|
||||||
|
db.updateCoverageStatus(storeListAdditional.get(i).getSTORE_ID(), uploadStatus);
|
||||||
|
db.updateStoreStatusOnLeave(storeListAdditional.get(i).getSTORE_ID(), storeList.get(i).getVISIT_DATE(),
|
||||||
|
uploadStatus, CommonString.FROM_ADDITIONAL);
|
||||||
|
|
||||||
|
db.deleteTableWithStoreID(storeListAdditional.get(i).getSTORE_ID());
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
} catch (MalformedURLException e) {
|
} catch (MalformedURLException e) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
|
|||||||
@@ -15,6 +15,15 @@ public class BrandMasterGetterSetter {
|
|||||||
ArrayList<String> SUB_CATEGORY_ID = new ArrayList<>();
|
ArrayList<String> SUB_CATEGORY_ID = new ArrayList<>();
|
||||||
ArrayList<String> COMPANY_ID = new ArrayList<>();
|
ArrayList<String> COMPANY_ID = new ArrayList<>();
|
||||||
ArrayList<String> BRAND_SEQUENCE = new ArrayList<>();
|
ArrayList<String> BRAND_SEQUENCE = new ArrayList<>();
|
||||||
|
ArrayList<String> BRAND_SEQUENCE_SA = new ArrayList<>();
|
||||||
|
|
||||||
|
public ArrayList<String> getBRAND_SEQUENCE_SA() {
|
||||||
|
return BRAND_SEQUENCE_SA;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setBRAND_SEQUENCE_SA(String BRAND_SEQUENCE_SA) {
|
||||||
|
this.BRAND_SEQUENCE_SA.add(BRAND_SEQUENCE_SA);
|
||||||
|
}
|
||||||
|
|
||||||
public String getTable_BRAND_MASTER() {
|
public String getTable_BRAND_MASTER() {
|
||||||
return table_BRAND_MASTER;
|
return table_BRAND_MASTER;
|
||||||
|
|||||||
@@ -0,0 +1,38 @@
|
|||||||
|
package cpm.com.gskmtorange.xmlGetterSetter;
|
||||||
|
|
||||||
|
public class ImageGetterSetter {
|
||||||
|
|
||||||
|
String image1="", image2="", image3="", image4="";
|
||||||
|
|
||||||
|
public String getImage1() {
|
||||||
|
return image1;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setImage1(String image1) {
|
||||||
|
this.image1 = image1;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getImage2() {
|
||||||
|
return image2;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setImage2(String image2) {
|
||||||
|
this.image2 = image2;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getImage3() {
|
||||||
|
return image3;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setImage3(String image3) {
|
||||||
|
this.image3 = image3;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getImage4() {
|
||||||
|
return image4;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setImage4(String image4) {
|
||||||
|
this.image4 = image4;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -10,6 +10,25 @@ public class MSL_AvailabilityStockFacingGetterSetter implements Serializable{
|
|||||||
String sub_category_id, sub_category, brand_id, brand,
|
String sub_category_id, sub_category, brand_id, brand,
|
||||||
sku_id, sku, mrp, sku_sequence, toggleValue, mbq, category_id, facing="", stock,company_id,must_have;
|
sku_id, sku, mrp, sku_sequence, toggleValue, mbq, category_id, facing="", stock,company_id,must_have;
|
||||||
|
|
||||||
|
public String getImgPath() {
|
||||||
|
return imgPath;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setImgPath(String imgPath) {
|
||||||
|
this.imgPath = imgPath;
|
||||||
|
}
|
||||||
|
|
||||||
|
public int getIsChecked() {
|
||||||
|
return isChecked;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setIsChecked(int isChecked) {
|
||||||
|
this.isChecked = isChecked;
|
||||||
|
}
|
||||||
|
|
||||||
|
String imgPath="";
|
||||||
|
int isChecked=-1;
|
||||||
|
|
||||||
public String getSub_category_id() {
|
public String getSub_category_id() {
|
||||||
return sub_category_id;
|
return sub_category_id;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,35 @@
|
|||||||
|
package cpm.com.gskmtorange.xmlGetterSetter;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
|
|
||||||
|
public class MappingPharmaMSLGetterSetter {
|
||||||
|
|
||||||
|
String table_MAPPING_PHARMA_MSL;
|
||||||
|
|
||||||
|
ArrayList<String> COUNTRY_ID = new ArrayList<>();
|
||||||
|
ArrayList<String> SKU_ID = new ArrayList<>();
|
||||||
|
|
||||||
|
public String getTable_MAPPING_PHARMA_MSL() {
|
||||||
|
return table_MAPPING_PHARMA_MSL;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setTable_MAPPING_PHARMA_MSL(String table_MAPPING_PHARMA_MSL) {
|
||||||
|
this.table_MAPPING_PHARMA_MSL = table_MAPPING_PHARMA_MSL;
|
||||||
|
}
|
||||||
|
|
||||||
|
public ArrayList<String> getCOUNTRY_ID() {
|
||||||
|
return COUNTRY_ID;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setCOUNTRY_ID(String COUNTRY_ID) {
|
||||||
|
this.COUNTRY_ID.add(COUNTRY_ID);
|
||||||
|
}
|
||||||
|
|
||||||
|
public ArrayList<String> getSKU_ID() {
|
||||||
|
return SKU_ID;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setSKU_ID(String SKU_ID) {
|
||||||
|
this.SKU_ID.add(SKU_ID);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,99 @@
|
|||||||
|
package cpm.com.gskmtorange.xmlGetterSetter;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
|
|
||||||
|
public class MappingPharmaQuestionGetterSetter {
|
||||||
|
|
||||||
|
String table_MAPPING_PHARMA_QUESTION;
|
||||||
|
|
||||||
|
public String getImgPath() {
|
||||||
|
return imgPath;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setImgPath(String imgPath) {
|
||||||
|
this.imgPath = imgPath;
|
||||||
|
}
|
||||||
|
|
||||||
|
public int getIsChecked() {
|
||||||
|
return isChecked;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setIsChecked(int isChecked) {
|
||||||
|
this.isChecked = isChecked;
|
||||||
|
}
|
||||||
|
|
||||||
|
String imgPath="";
|
||||||
|
int isChecked=-1;
|
||||||
|
|
||||||
|
ArrayList<String> QUESTION_ID = new ArrayList<>();
|
||||||
|
ArrayList<String> QUESTION= new ArrayList<>();
|
||||||
|
ArrayList<String> BRAND_ID= new ArrayList<>();
|
||||||
|
ArrayList<String> BRAND= new ArrayList<>();
|
||||||
|
ArrayList<String> SUB_CATEGORY_ID= new ArrayList<>();
|
||||||
|
ArrayList<String> SUB_CATEGORY= new ArrayList<>();
|
||||||
|
ArrayList<String> QUESTION_SEQUENCE= new ArrayList<>();
|
||||||
|
|
||||||
|
public String getTable_MAPPING_PHARMA_QUESTION() {
|
||||||
|
return table_MAPPING_PHARMA_QUESTION;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setTable_MAPPING_PHARMA_QUESTION(String table_MAPPING_PHARMA_QUESTION) {
|
||||||
|
this.table_MAPPING_PHARMA_QUESTION = table_MAPPING_PHARMA_QUESTION;
|
||||||
|
}
|
||||||
|
|
||||||
|
public ArrayList<String> getQUESTION_ID() {
|
||||||
|
return QUESTION_ID;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setQUESTION_ID(String QUESTION_ID) {
|
||||||
|
this.QUESTION_ID.add(QUESTION_ID);
|
||||||
|
}
|
||||||
|
|
||||||
|
public ArrayList<String> getQUESTION() {
|
||||||
|
return QUESTION;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setQUESTION(String QUESTION) {
|
||||||
|
this.QUESTION.add(QUESTION);
|
||||||
|
}
|
||||||
|
|
||||||
|
public ArrayList<String> getBRAND_ID() {
|
||||||
|
return BRAND_ID;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setBRAND_ID(String BRAND_ID) {
|
||||||
|
this.BRAND_ID.add(BRAND_ID);
|
||||||
|
}
|
||||||
|
|
||||||
|
public ArrayList<String> getBRAND() {
|
||||||
|
return BRAND;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setBRAND(String BRAND) {
|
||||||
|
this.BRAND.add(BRAND);
|
||||||
|
}
|
||||||
|
|
||||||
|
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);
|
||||||
|
}
|
||||||
|
|
||||||
|
public ArrayList<String> getSUB_CATEGORY() {
|
||||||
|
return SUB_CATEGORY;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setSUB_CATEGORY(String SUB_CATEGORY) {
|
||||||
|
this.SUB_CATEGORY.add(SUB_CATEGORY);
|
||||||
|
}
|
||||||
|
|
||||||
|
public ArrayList<String> getQUESTION_SEQUENCE() {
|
||||||
|
return QUESTION_SEQUENCE;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setQUESTION_SEQUENCE(String QUESTION_SEQUENCE) {
|
||||||
|
this.QUESTION_SEQUENCE.add(QUESTION_SEQUENCE);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,40 @@
|
|||||||
|
package cpm.com.gskmtorange.xmlGetterSetter;
|
||||||
|
|
||||||
|
public class PharmaMSLInsertedGetterSetter {
|
||||||
|
|
||||||
|
int present = -1;
|
||||||
|
|
||||||
|
String skuId, sku, brandId;
|
||||||
|
|
||||||
|
public int getPresent() {
|
||||||
|
return present;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setPresent(int present) {
|
||||||
|
this.present = present;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getSkuId() {
|
||||||
|
return skuId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setSkuId(String skuId) {
|
||||||
|
this.skuId = skuId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getSku() {
|
||||||
|
return sku;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setSku(String sku) {
|
||||||
|
this.sku = sku;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getBrandId() {
|
||||||
|
return brandId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setBrandId(String brandId) {
|
||||||
|
this.brandId = brandId;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,72 @@
|
|||||||
|
package cpm.com.gskmtorange.xmlGetterSetter;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
|
|
||||||
|
public class PharmaSOSGetterSetter {
|
||||||
|
|
||||||
|
String QUESTION_ID, QUESTION, BRAND_ID, BRAND, SUB_CATEGORY_ID, SUB_CATEGORY, gskFacing, competitorFacing;
|
||||||
|
|
||||||
|
public String getQUESTION_ID() {
|
||||||
|
return QUESTION_ID;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setQUESTION_ID(String QUESTION_ID) {
|
||||||
|
this.QUESTION_ID = QUESTION_ID;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getQUESTION() {
|
||||||
|
return QUESTION;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setQUESTION(String QUESTION) {
|
||||||
|
this.QUESTION = QUESTION;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getBRAND_ID() {
|
||||||
|
return BRAND_ID;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setBRAND_ID(String BRAND_ID) {
|
||||||
|
this.BRAND_ID = BRAND_ID;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getBRAND() {
|
||||||
|
return BRAND;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setBRAND(String BRAND) {
|
||||||
|
this.BRAND = BRAND;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getSUB_CATEGORY_ID() {
|
||||||
|
return SUB_CATEGORY_ID;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setSUB_CATEGORY_ID(String SUB_CATEGORY_ID) {
|
||||||
|
this.SUB_CATEGORY_ID = SUB_CATEGORY_ID;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getSUB_CATEGORY() {
|
||||||
|
return SUB_CATEGORY;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setSUB_CATEGORY(String SUB_CATEGORY) {
|
||||||
|
this.SUB_CATEGORY = SUB_CATEGORY;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getGskFacing() {
|
||||||
|
return gskFacing;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setGskFacing(String gskFacing) {
|
||||||
|
this.gskFacing = gskFacing;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getCompetitorFacing() {
|
||||||
|
return competitorFacing;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setCompetitorFacing(String competitorFacing) {
|
||||||
|
this.competitorFacing = competitorFacing;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -17,6 +17,16 @@ public class SkuMasterGetterSetter {
|
|||||||
ArrayList<String> SKU_SEQUENCE = new ArrayList<>();
|
ArrayList<String> SKU_SEQUENCE = new ArrayList<>();
|
||||||
ArrayList<String> PROMO_SKU = new ArrayList<>();
|
ArrayList<String> PROMO_SKU = new ArrayList<>();
|
||||||
|
|
||||||
|
public ArrayList<String> getSKU_SEQUENCE_SA() {
|
||||||
|
return SKU_SEQUENCE_SA;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setSKU_SEQUENCE_SA(String SKU_SEQUENCE_SA) {
|
||||||
|
this.SKU_SEQUENCE_SA.add(SKU_SEQUENCE_SA);
|
||||||
|
}
|
||||||
|
|
||||||
|
ArrayList<String> SKU_SEQUENCE_SA = new ArrayList<>();
|
||||||
|
|
||||||
public ArrayList<String> getSKU_ID() {
|
public ArrayList<String> getSKU_ID() {
|
||||||
return SKU_ID;
|
return SKU_ID;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -15,6 +15,16 @@ public class SubCategoryMasterGetterSetter {
|
|||||||
ArrayList<String> CATEGORY_ID = new ArrayList<>();
|
ArrayList<String> CATEGORY_ID = new ArrayList<>();
|
||||||
ArrayList<String> SUB_CATEGORY_SEQUENCE = new ArrayList<>();
|
ArrayList<String> SUB_CATEGORY_SEQUENCE = new ArrayList<>();
|
||||||
|
|
||||||
|
public ArrayList<String> getSUB_CATEGORY_SEQUENCE_SA() {
|
||||||
|
return SUB_CATEGORY_SEQUENCE_SA;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setSUB_CATEGORY_SEQUENCE_SA(String SUB_CATEGORY_SEQUENCE_SA) {
|
||||||
|
this.SUB_CATEGORY_SEQUENCE_SA.add(SUB_CATEGORY_SEQUENCE_SA);
|
||||||
|
}
|
||||||
|
|
||||||
|
ArrayList<String> SUB_CATEGORY_SEQUENCE_SA = new ArrayList<>();
|
||||||
|
|
||||||
|
|
||||||
public String getTable_SUB_CATEGORY_MASTER() {
|
public String getTable_SUB_CATEGORY_MASTER() {
|
||||||
return table_SUB_CATEGORY_MASTER;
|
return table_SUB_CATEGORY_MASTER;
|
||||||
|
|||||||
@@ -44,6 +44,55 @@ public class TableBean {
|
|||||||
public static String Table_MAPPING_STOCK_STOREWISE;
|
public static String Table_MAPPING_STOCK_STOREWISE;
|
||||||
public static String Table_MAPPING_PLANOGRAM_STORE_WISE;
|
public static String Table_MAPPING_PLANOGRAM_STORE_WISE;
|
||||||
|
|
||||||
|
public static String getTable_MAPPING_PHARMA_MSL() {
|
||||||
|
return Table_MAPPING_PHARMA_MSL;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static void setTable_MAPPING_PHARMA_MSL(String table_MAPPING_PHARMA_MSL) {
|
||||||
|
Table_MAPPING_PHARMA_MSL = table_MAPPING_PHARMA_MSL;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static String Table_MAPPING_PHARMA_MSL;
|
||||||
|
|
||||||
|
public static String getTable_MAPPING_PHARMA_QUESTION() {
|
||||||
|
return Table_MAPPING_PHARMA_QUESTION;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static void setTable_MAPPING_PHARMA_QUESTION(String table_MAPPING_PHARMA_QUESTION) {
|
||||||
|
Table_MAPPING_PHARMA_QUESTION = table_MAPPING_PHARMA_QUESTION;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static String getTable_JOURNEY_PLAN_PHARMA() {
|
||||||
|
return Table_JOURNEY_PLAN_PHARMA;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static void setTable_JOURNEY_PLAN_PHARMA(String table_JOURNEY_PLAN_PHARMA) {
|
||||||
|
Table_JOURNEY_PLAN_PHARMA = table_JOURNEY_PLAN_PHARMA;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static String Table_MAPPING_PHARMA_QUESTION;
|
||||||
|
public static String Table_JOURNEY_PLAN_PHARMA;
|
||||||
|
|
||||||
|
public static String getAdditionalJourneyPlan() {
|
||||||
|
return ADDITIONAL_JOURNEY_PLAN;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static void setAdditionalJourneyPlan(String additionalJourneyPlan) {
|
||||||
|
ADDITIONAL_JOURNEY_PLAN = additionalJourneyPlan;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static String ADDITIONAL_JOURNEY_PLAN;
|
||||||
|
|
||||||
|
public static String getMappingStockAdditional() {
|
||||||
|
return MAPPING_STOCK_ADDITIONAL;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static void setMappingStockAdditional(String mappingStockAdditional) {
|
||||||
|
MAPPING_STOCK_ADDITIONAL = mappingStockAdditional;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static String MAPPING_STOCK_ADDITIONAL;
|
||||||
|
|
||||||
public static String getTable_NON_WORKING_SUB_REASON() {
|
public static String getTable_NON_WORKING_SUB_REASON() {
|
||||||
return Table_NON_WORKING_SUB_REASON;
|
return Table_NON_WORKING_SUB_REASON;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -24,6 +24,8 @@ import cpm.com.gskmtorange.xmlGetterSetter.MAPPING_PLANOGRAM_MasterGetterSetter;
|
|||||||
import cpm.com.gskmtorange.xmlGetterSetter.MAPPING_SOS_TARGET_MasterGetterSetter;
|
import cpm.com.gskmtorange.xmlGetterSetter.MAPPING_SOS_TARGET_MasterGetterSetter;
|
||||||
import cpm.com.gskmtorange.xmlGetterSetter.MappingCategoryImageAllowGetterSetter;
|
import cpm.com.gskmtorange.xmlGetterSetter.MappingCategoryImageAllowGetterSetter;
|
||||||
import cpm.com.gskmtorange.xmlGetterSetter.MappingDisplayChecklistGetterSetter;
|
import cpm.com.gskmtorange.xmlGetterSetter.MappingDisplayChecklistGetterSetter;
|
||||||
|
import cpm.com.gskmtorange.xmlGetterSetter.MappingPharmaMSLGetterSetter;
|
||||||
|
import cpm.com.gskmtorange.xmlGetterSetter.MappingPharmaQuestionGetterSetter;
|
||||||
import cpm.com.gskmtorange.xmlGetterSetter.MappingPlanogramCountrywiseGetterSetter;
|
import cpm.com.gskmtorange.xmlGetterSetter.MappingPlanogramCountrywiseGetterSetter;
|
||||||
import cpm.com.gskmtorange.xmlGetterSetter.MappingPlanogramStorewiseGetterSetter;
|
import cpm.com.gskmtorange.xmlGetterSetter.MappingPlanogramStorewiseGetterSetter;
|
||||||
import cpm.com.gskmtorange.xmlGetterSetter.MappingPromotionGetterSetter;
|
import cpm.com.gskmtorange.xmlGetterSetter.MappingPromotionGetterSetter;
|
||||||
@@ -257,6 +259,9 @@ public class XMLHandlers {
|
|||||||
if (xpp.getName().equals("PROMO_SKU")) {
|
if (xpp.getName().equals("PROMO_SKU")) {
|
||||||
sku.setPROMO_SKU(xpp.nextText());
|
sku.setPROMO_SKU(xpp.nextText());
|
||||||
}
|
}
|
||||||
|
if (xpp.getName().equals("SKU_SEQUENCE_SA")) {
|
||||||
|
sku.setSKU_SEQUENCE_SA(xpp.nextText());
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
xpp.next();
|
xpp.next();
|
||||||
@@ -297,6 +302,9 @@ public class XMLHandlers {
|
|||||||
if (xpp.getName().equals("BRAND_SEQUENCE")) {
|
if (xpp.getName().equals("BRAND_SEQUENCE")) {
|
||||||
brand.setBRAND_SEQUENCE(xpp.nextText());
|
brand.setBRAND_SEQUENCE(xpp.nextText());
|
||||||
}
|
}
|
||||||
|
if (xpp.getName().equals("BRAND_SEQUENCE_SA")) {
|
||||||
|
brand.setBRAND_SEQUENCE_SA(xpp.nextText());
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
xpp.next();
|
xpp.next();
|
||||||
@@ -334,6 +342,9 @@ public class XMLHandlers {
|
|||||||
if (xpp.getName().equals("SUB_CATEGORY_SEQUENCE")) {
|
if (xpp.getName().equals("SUB_CATEGORY_SEQUENCE")) {
|
||||||
category.setSUB_CATEGORY_SEQUENCE(xpp.nextText());
|
category.setSUB_CATEGORY_SEQUENCE(xpp.nextText());
|
||||||
}
|
}
|
||||||
|
if (xpp.getName().equals("SUB_CATEGORY_SEQUENCE_SA")) {
|
||||||
|
category.setSUB_CATEGORY_SEQUENCE_SA(xpp.nextText());
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
xpp.next();
|
xpp.next();
|
||||||
@@ -1502,4 +1513,79 @@ public class XMLHandlers {
|
|||||||
}
|
}
|
||||||
return st;
|
return st;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// MAPPING_PHARMA_QUESTION XML HANDLER
|
||||||
|
public static MappingPharmaQuestionGetterSetter mappingPharmaQuestionXMLHandler(XmlPullParser xpp,
|
||||||
|
int eventType) {
|
||||||
|
MappingPharmaQuestionGetterSetter stock = new MappingPharmaQuestionGetterSetter();
|
||||||
|
|
||||||
|
try {
|
||||||
|
while (xpp.getEventType() != XmlPullParser.END_DOCUMENT) {
|
||||||
|
if (xpp.getEventType() == XmlPullParser.START_TAG) {
|
||||||
|
if (xpp.getName().equals("META_DATA")) {
|
||||||
|
stock.setTable_MAPPING_PHARMA_QUESTION(xpp.nextText());
|
||||||
|
}
|
||||||
|
if (xpp.getName().equals("QUESTION_ID")) {
|
||||||
|
stock.setQUESTION_ID(xpp.nextText());
|
||||||
|
}
|
||||||
|
if (xpp.getName().equals("QUESTION")) {
|
||||||
|
stock.setQUESTION(xpp.nextText());
|
||||||
|
}
|
||||||
|
if (xpp.getName().equals("BRAND_ID")) {
|
||||||
|
stock.setBRAND_ID(xpp.nextText());
|
||||||
|
}
|
||||||
|
if (xpp.getName().equals("BRAND")) {
|
||||||
|
stock.setBRAND(xpp.nextText());
|
||||||
|
}
|
||||||
|
if (xpp.getName().equals("SUB_CATEGORY_ID")) {
|
||||||
|
stock.setSUB_CATEGORY_ID(xpp.nextText());
|
||||||
|
}
|
||||||
|
if (xpp.getName().equals("SUB_CATEGORY")) {
|
||||||
|
stock.setSUB_CATEGORY(xpp.nextText());
|
||||||
|
}if (xpp.getName().equals("QUESTION_SEQUENCE")) {
|
||||||
|
stock.setQUESTION_SEQUENCE(xpp.nextText());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
xpp.next();
|
||||||
|
}
|
||||||
|
} catch (XmlPullParserException e) {
|
||||||
|
|
||||||
|
e.printStackTrace();
|
||||||
|
} catch (IOException e) {
|
||||||
|
|
||||||
|
e.printStackTrace();
|
||||||
|
}
|
||||||
|
return stock;
|
||||||
|
}
|
||||||
|
|
||||||
|
// MAPPING_PHARMA_MSL XML HANDLER
|
||||||
|
public static MappingPharmaMSLGetterSetter mappingPharmaMSLXMLHandler(XmlPullParser xpp,
|
||||||
|
int eventType) {
|
||||||
|
MappingPharmaMSLGetterSetter stock = new MappingPharmaMSLGetterSetter();
|
||||||
|
|
||||||
|
try {
|
||||||
|
while (xpp.getEventType() != XmlPullParser.END_DOCUMENT) {
|
||||||
|
if (xpp.getEventType() == XmlPullParser.START_TAG) {
|
||||||
|
if (xpp.getName().equals("META_DATA")) {
|
||||||
|
stock.setTable_MAPPING_PHARMA_MSL(xpp.nextText());
|
||||||
|
}
|
||||||
|
if (xpp.getName().equals("COUNTRY_ID")) {
|
||||||
|
stock.setCOUNTRY_ID(xpp.nextText());
|
||||||
|
}
|
||||||
|
if (xpp.getName().equals("SKU_ID")) {
|
||||||
|
stock.setSKU_ID(xpp.nextText());
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
xpp.next();
|
||||||
|
}
|
||||||
|
} catch (XmlPullParserException e) {
|
||||||
|
|
||||||
|
e.printStackTrace();
|
||||||
|
} catch (IOException e) {
|
||||||
|
|
||||||
|
e.printStackTrace();
|
||||||
|
}
|
||||||
|
return stock;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -31,5 +31,12 @@
|
|||||||
android:layout_margin="@dimen/fab_margin"
|
android:layout_margin="@dimen/fab_margin"
|
||||||
app:srcCompat="@drawable/save_icon" />
|
app:srcCompat="@drawable/save_icon" />
|
||||||
|
|
||||||
|
<android.support.design.widget.FloatingActionButton
|
||||||
|
android:id="@+id/fab_add"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_gravity="bottom|left"
|
||||||
|
android:layout_margin="@dimen/fab_margin"
|
||||||
|
app:srcCompat="@drawable/add" />
|
||||||
|
|
||||||
</android.support.design.widget.CoordinatorLayout>
|
</android.support.design.widget.CoordinatorLayout>
|
||||||
|
|||||||
@@ -0,0 +1,33 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<android.support.design.widget.CoordinatorLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||||
|
xmlns:tools="http://schemas.android.com/tools"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
tools:context=".pharma_stores.PharmaActivity">
|
||||||
|
|
||||||
|
<android.support.design.widget.AppBarLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:theme="@style/AppTheme.AppBarOverlay">
|
||||||
|
|
||||||
|
<android.support.v7.widget.Toolbar
|
||||||
|
android:id="@+id/toolbar"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="?attr/actionBarSize"
|
||||||
|
android:background="?attr/colorPrimary"
|
||||||
|
app:popupTheme="@style/AppTheme.PopupOverlay" />
|
||||||
|
|
||||||
|
</android.support.design.widget.AppBarLayout>
|
||||||
|
|
||||||
|
<include layout="@layout/content_paharma" />
|
||||||
|
|
||||||
|
<android.support.design.widget.FloatingActionButton
|
||||||
|
android:id="@+id/fab"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_gravity="bottom|end"
|
||||||
|
android:layout_margin="@dimen/fab_margin"
|
||||||
|
app:srcCompat="@mipmap/save_icon" />
|
||||||
|
|
||||||
|
</android.support.design.widget.CoordinatorLayout>
|
||||||
@@ -0,0 +1,33 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<android.support.design.widget.CoordinatorLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||||
|
xmlns:tools="http://schemas.android.com/tools"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
tools:context=".dailyentry.StockActivity">
|
||||||
|
|
||||||
|
<android.support.design.widget.AppBarLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:theme="@style/AppTheme.AppBarOverlay">
|
||||||
|
|
||||||
|
<android.support.v7.widget.Toolbar
|
||||||
|
android:id="@+id/toolbar"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="?attr/actionBarSize"
|
||||||
|
android:background="?attr/colorPrimary"
|
||||||
|
app:popupTheme="@style/AppTheme.PopupOverlay" />
|
||||||
|
|
||||||
|
</android.support.design.widget.AppBarLayout>
|
||||||
|
|
||||||
|
<include layout="@layout/content_stock" />
|
||||||
|
|
||||||
|
<android.support.design.widget.FloatingActionButton
|
||||||
|
android:id="@+id/fab"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_gravity="bottom|end"
|
||||||
|
android:layout_margin="@dimen/fab_margin"
|
||||||
|
app:srcCompat="@mipmap/save_icon" />
|
||||||
|
|
||||||
|
</android.support.design.widget.CoordinatorLayout>
|
||||||
@@ -1,12 +1,13 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||||
xmlns:tools="http://schemas.android.com/tools"
|
xmlns:tools="http://schemas.android.com/tools"
|
||||||
android:id="@+id/content_msl__availability"
|
android:id="@+id/content_msl__availability"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
app:layout_behavior="@string/appbar_scrolling_view_behavior"
|
app:layout_behavior="@string/appbar_scrolling_view_behavior"
|
||||||
tools:showIn="@layout/activity_msl__availability">
|
tools:showIn="@layout/activity_msl__availability"
|
||||||
|
android:orientation="vertical">
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
@@ -96,4 +97,10 @@
|
|||||||
android:dividerHeight="0dp"
|
android:dividerHeight="0dp"
|
||||||
android:scrollingCache="false" />
|
android:scrollingCache="false" />
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
</RelativeLayout>
|
|
||||||
|
<ImageView
|
||||||
|
android:id="@+id/image"
|
||||||
|
android:layout_width="fill_parent"
|
||||||
|
android:layout_height="fill_parent"
|
||||||
|
/>
|
||||||
|
</LinearLayout>
|
||||||
|
|||||||
@@ -0,0 +1,8 @@
|
|||||||
|
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||||
|
xmlns:tools="http://schemas.android.com/tools"
|
||||||
|
android:id="@+id/fragment"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
app:layout_behavior="@string/appbar_scrolling_view_behavior"
|
||||||
|
/>
|
||||||
@@ -0,0 +1,20 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<android.support.constraint.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||||
|
xmlns:tools="http://schemas.android.com/tools"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
app:layout_behavior="@string/appbar_scrolling_view_behavior"
|
||||||
|
tools:context=".dailyentry.StockActivity"
|
||||||
|
tools:showIn="@layout/activity_stock">
|
||||||
|
|
||||||
|
<ExpandableListView
|
||||||
|
android:id="@+id/expandableListView"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:cacheColorHint="#00000000"
|
||||||
|
android:divider="@null"
|
||||||
|
android:dividerHeight="0dp"
|
||||||
|
android:scrollingCache="false" />
|
||||||
|
|
||||||
|
</android.support.constraint.ConstraintLayout>
|
||||||
@@ -0,0 +1,70 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
xmlns:card_view="http://schemas.android.com/apk/res-auto"
|
||||||
|
android:layout_width="fill_parent"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:orientation="vertical">
|
||||||
|
|
||||||
|
<android.support.v7.widget.CardView
|
||||||
|
android:layout_width="300dp"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginTop="20dp"
|
||||||
|
card_view:cardBackgroundColor="@color/colorPrimary"
|
||||||
|
card_view:cardCornerRadius="10dp"
|
||||||
|
>
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:orientation="vertical"
|
||||||
|
android:layout_marginTop="10dp">
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginLeft="5dp"
|
||||||
|
android:textColor="@color/white"
|
||||||
|
android:textSize="@dimen/text_size_normal"
|
||||||
|
android:text="@string/title_activity_Want_to_delete1"
|
||||||
|
android:gravity="center"
|
||||||
|
android:textStyle="bold"
|
||||||
|
android:layout_marginTop="10dp"
|
||||||
|
/>
|
||||||
|
|
||||||
|
<RelativeLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_weight="1"
|
||||||
|
android:layout_marginTop="10dp"
|
||||||
|
android:layout_marginBottom="10dp">
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:orientation="horizontal"
|
||||||
|
android:layout_centerInParent="true">
|
||||||
|
|
||||||
|
<Button
|
||||||
|
android:id="@+id/btn_yes"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="@string/yes"
|
||||||
|
/>
|
||||||
|
|
||||||
|
<Button
|
||||||
|
android:layout_marginLeft="10dp"
|
||||||
|
android:id="@+id/btn_no"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="@string/no"
|
||||||
|
/>
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
</RelativeLayout>
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
</android.support.v7.widget.CardView>
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
@@ -0,0 +1,219 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
xmlns:tools="http://schemas.android.com/tools"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
tools:context=".pharma_stores.MSLFragment">
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:background="@color/white"
|
||||||
|
android:orientation="vertical"
|
||||||
|
android:layout_alignParentTop="true"
|
||||||
|
android:layout_alignParentLeft="true"
|
||||||
|
android:layout_alignParentStart="true">
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/txt_mslAvailabilityName"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:background="#FFF1710F"
|
||||||
|
android:paddingBottom="10dp"
|
||||||
|
android:paddingLeft="20dp"
|
||||||
|
android:paddingTop="10dp"
|
||||||
|
android:text="Must Have Availability"
|
||||||
|
android:textAppearance="?android:attr/textAppearanceMedium"
|
||||||
|
android:textColor="@android:color/black"
|
||||||
|
android:visibility="gone" />
|
||||||
|
|
||||||
|
<!--Camera Layout-->
|
||||||
|
<LinearLayout
|
||||||
|
android:id="@+id/lin_camera"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:orientation="horizontal"
|
||||||
|
android:weightSum="4"
|
||||||
|
android:visibility="gone">
|
||||||
|
|
||||||
|
<!--camera 1-->
|
||||||
|
<LinearLayout
|
||||||
|
android:id="@+id/lin_camera1"
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_weight="1"
|
||||||
|
android:background="@drawable/layout_click_background_effect"
|
||||||
|
android:gravity="center_horizontal"
|
||||||
|
android:padding="5dp">
|
||||||
|
|
||||||
|
<ImageView
|
||||||
|
android:id="@+id/img_camera1"
|
||||||
|
android:layout_width="30dp"
|
||||||
|
android:layout_height="30dp"
|
||||||
|
android:layout_marginRight="10dp" />
|
||||||
|
<!--android:src="@mipmap/camera_orange"-->
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
<View
|
||||||
|
android:layout_width="1dp"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:background="@color/grey_dark_background" />
|
||||||
|
|
||||||
|
<!--camera 2-->
|
||||||
|
<LinearLayout
|
||||||
|
android:id="@+id/lin_camera2"
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_weight="1"
|
||||||
|
android:background="@drawable/layout_click_background_effect"
|
||||||
|
android:gravity="center_horizontal"
|
||||||
|
android:padding="5dp">
|
||||||
|
|
||||||
|
<ImageView
|
||||||
|
android:id="@+id/img_camera2"
|
||||||
|
android:layout_width="30dp"
|
||||||
|
android:layout_height="30dp"
|
||||||
|
android:layout_marginRight="10dp" />
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
<View
|
||||||
|
android:id="@+id/view_camera2"
|
||||||
|
android:layout_width="1dp"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:background="@color/grey_dark_background" />
|
||||||
|
|
||||||
|
<!--camera 3-->
|
||||||
|
<LinearLayout
|
||||||
|
android:id="@+id/lin_camera3"
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_weight="1"
|
||||||
|
android:background="@drawable/layout_click_background_effect"
|
||||||
|
android:gravity="center_horizontal"
|
||||||
|
android:padding="5dp">
|
||||||
|
|
||||||
|
<ImageView
|
||||||
|
android:id="@+id/img_camera3"
|
||||||
|
android:layout_width="30dp"
|
||||||
|
android:layout_height="30dp"
|
||||||
|
android:layout_marginRight="10dp" />
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
<View
|
||||||
|
android:id="@+id/view_camera3"
|
||||||
|
android:layout_width="1dp"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:background="@color/grey_dark_background" />
|
||||||
|
|
||||||
|
<!--camera 4-->
|
||||||
|
<LinearLayout
|
||||||
|
android:id="@+id/lin_camera4"
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_weight="1"
|
||||||
|
android:background="@drawable/layout_click_background_effect"
|
||||||
|
android:gravity="center_horizontal"
|
||||||
|
android:padding="5dp">
|
||||||
|
|
||||||
|
<ImageView
|
||||||
|
android:id="@+id/img_camera4"
|
||||||
|
android:layout_width="30dp"
|
||||||
|
android:layout_height="30dp"
|
||||||
|
android:layout_marginRight="10dp" />
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
<View
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="1dp"
|
||||||
|
android:background="@color/grey_dark_background" />
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:id="@+id/lin_category"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:orientation="horizontal"
|
||||||
|
android:padding="5dp"
|
||||||
|
android:weightSum="1"
|
||||||
|
android:visibility="gone">
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:layout_weight=".25"
|
||||||
|
android:orientation="vertical">
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:gravity="center"
|
||||||
|
android:paddingBottom="5dp"
|
||||||
|
android:paddingTop="5dp"
|
||||||
|
android:text="@string/msl_availability_mbq"
|
||||||
|
android:textAppearance="?android:attr/textAppearanceSmall"
|
||||||
|
android:textColor="#222" />
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:layout_weight=".25"
|
||||||
|
android:orientation="vertical">
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:gravity="center"
|
||||||
|
android:paddingBottom="5dp"
|
||||||
|
android:paddingTop="5dp"
|
||||||
|
android:text="@string/msl_availability_availability"
|
||||||
|
android:textAppearance="?android:attr/textAppearanceSmall"
|
||||||
|
android:textColor="#222" />
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:layout_weight=".25"
|
||||||
|
android:orientation="vertical">
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:gravity="center"
|
||||||
|
android:paddingBottom="5dp"
|
||||||
|
android:paddingTop="5dp"
|
||||||
|
android:text="@string/stock_facing_faceup"
|
||||||
|
android:textAppearance="?android:attr/textAppearanceSmall"
|
||||||
|
android:textColor="#222" />
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:layout_weight=".25"
|
||||||
|
android:orientation="vertical">
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:gravity="center"
|
||||||
|
android:paddingBottom="5dp"
|
||||||
|
android:paddingTop="5dp"
|
||||||
|
android:text="@string/stock_facing_stock"
|
||||||
|
android:textAppearance="?android:attr/textAppearanceSmall"
|
||||||
|
android:textColor="#222" />
|
||||||
|
</LinearLayout>
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
<ExpandableListView
|
||||||
|
android:id="@+id/expandableListView"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:cacheColorHint="#00000000"
|
||||||
|
android:divider="@null"
|
||||||
|
android:dividerHeight="0dp"
|
||||||
|
android:scrollingCache="false" />
|
||||||
|
</LinearLayout>
|
||||||
|
</FrameLayout>
|
||||||
@@ -0,0 +1,10 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<android.support.constraint.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||||
|
xmlns:tools="http://schemas.android.com/tools"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
tools:context=".pharma_stores.PharmaActivityFragment"
|
||||||
|
tools:showIn="@layout/activity_paharma">
|
||||||
|
|
||||||
|
</android.support.constraint.ConstraintLayout>
|
||||||
@@ -0,0 +1,94 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
xmlns:tools="http://schemas.android.com/tools"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
tools:context=".pharma_stores.SOSFragment">
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:background="@color/white"
|
||||||
|
android:orientation="vertical"
|
||||||
|
android:layout_alignParentTop="true"
|
||||||
|
android:layout_alignParentLeft="true"
|
||||||
|
android:layout_alignParentStart="true"
|
||||||
|
>
|
||||||
|
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:id="@+id/lin_camera"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:orientation="horizontal"
|
||||||
|
android:weightSum="3"
|
||||||
|
android:layout_marginTop="5dp"
|
||||||
|
android:layout_marginBottom="5dp"
|
||||||
|
>
|
||||||
|
|
||||||
|
<RelativeLayout
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_weight="1">
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="@string/brand"
|
||||||
|
android:padding="5dp"
|
||||||
|
android:textSize="@dimen/text_size_medium"
|
||||||
|
android:textStyle="bold"
|
||||||
|
android:textColor="@color/colorPrimary"
|
||||||
|
android:layout_centerInParent="true"/>
|
||||||
|
</RelativeLayout>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<RelativeLayout
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_weight="1">
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="@string/gsk"
|
||||||
|
android:padding="5dp"
|
||||||
|
android:textSize="@dimen/text_size_medium"
|
||||||
|
android:textStyle="bold"
|
||||||
|
android:textColor="@color/colorPrimary"
|
||||||
|
android:layout_centerInParent="true"/>
|
||||||
|
</RelativeLayout>
|
||||||
|
|
||||||
|
<RelativeLayout
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_weight="1">
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="@string/competitor"
|
||||||
|
android:padding="5dp"
|
||||||
|
android:textSize="@dimen/text_size_medium"
|
||||||
|
android:textStyle="bold"
|
||||||
|
android:textColor="@color/colorPrimary"
|
||||||
|
android:layout_centerInParent="true"/>
|
||||||
|
</RelativeLayout>
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
<View
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="2dp"
|
||||||
|
android:background="@color/colorPrimary"/>
|
||||||
|
|
||||||
|
<android.support.v7.widget.RecyclerView
|
||||||
|
android:id="@+id/rec_sos"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent"></android.support.v7.widget.RecyclerView>
|
||||||
|
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
</FrameLayout>
|
||||||
@@ -0,0 +1,223 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
xmlns:tools="http://schemas.android.com/tools"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
tools:context=".pharma_stores.StoreDetailFragment">
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:background="@color/white"
|
||||||
|
android:orientation="vertical"
|
||||||
|
android:layout_alignParentTop="true"
|
||||||
|
android:layout_alignParentLeft="true"
|
||||||
|
android:layout_alignParentStart="true">
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/txt_mslAvailabilityName"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:background="#FFF1710F"
|
||||||
|
android:paddingBottom="10dp"
|
||||||
|
android:paddingLeft="20dp"
|
||||||
|
android:paddingTop="10dp"
|
||||||
|
android:text="Must Have Availability"
|
||||||
|
android:textAppearance="?android:attr/textAppearanceMedium"
|
||||||
|
android:textColor="@android:color/black"
|
||||||
|
android:visibility="gone" />
|
||||||
|
|
||||||
|
<!--Camera Layout-->
|
||||||
|
<LinearLayout
|
||||||
|
android:id="@+id/lin_camera"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:orientation="horizontal"
|
||||||
|
android:weightSum="4"
|
||||||
|
>
|
||||||
|
|
||||||
|
<!--camera 1-->
|
||||||
|
<LinearLayout
|
||||||
|
android:id="@+id/lin_camera1"
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_weight="1"
|
||||||
|
android:background="@drawable/layout_click_background_effect"
|
||||||
|
android:gravity="center_horizontal"
|
||||||
|
android:padding="5dp">
|
||||||
|
|
||||||
|
<ImageView
|
||||||
|
android:id="@+id/img_camera1"
|
||||||
|
android:layout_width="30dp"
|
||||||
|
android:layout_height="30dp"
|
||||||
|
android:layout_marginRight="10dp"
|
||||||
|
android:background="@mipmap/camera_orange"/>
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
<View
|
||||||
|
android:layout_width="1dp"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:background="@color/grey_dark_background" />
|
||||||
|
|
||||||
|
<!--camera 2-->
|
||||||
|
<LinearLayout
|
||||||
|
android:id="@+id/lin_camera2"
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_weight="1"
|
||||||
|
android:background="@drawable/layout_click_background_effect"
|
||||||
|
android:gravity="center_horizontal"
|
||||||
|
android:padding="5dp">
|
||||||
|
|
||||||
|
<ImageView
|
||||||
|
android:id="@+id/img_camera2"
|
||||||
|
android:layout_width="30dp"
|
||||||
|
android:layout_height="30dp"
|
||||||
|
android:layout_marginRight="10dp"
|
||||||
|
android:background="@mipmap/camera_orange"/>
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
<View
|
||||||
|
android:id="@+id/view_camera2"
|
||||||
|
android:layout_width="1dp"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:background="@color/grey_dark_background" />
|
||||||
|
|
||||||
|
<!--camera 3-->
|
||||||
|
<LinearLayout
|
||||||
|
android:id="@+id/lin_camera3"
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_weight="1"
|
||||||
|
android:background="@drawable/layout_click_background_effect"
|
||||||
|
android:gravity="center_horizontal"
|
||||||
|
android:padding="5dp">
|
||||||
|
|
||||||
|
<ImageView
|
||||||
|
android:id="@+id/img_camera3"
|
||||||
|
android:layout_width="30dp"
|
||||||
|
android:layout_height="30dp"
|
||||||
|
android:layout_marginRight="10dp"
|
||||||
|
android:background="@mipmap/camera_orange"/>
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
<View
|
||||||
|
android:id="@+id/view_camera3"
|
||||||
|
android:layout_width="1dp"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:background="@color/grey_dark_background" />
|
||||||
|
|
||||||
|
<!--camera 4-->
|
||||||
|
<LinearLayout
|
||||||
|
android:id="@+id/lin_camera4"
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_weight="1"
|
||||||
|
android:background="@drawable/layout_click_background_effect"
|
||||||
|
android:gravity="center_horizontal"
|
||||||
|
android:padding="5dp">
|
||||||
|
|
||||||
|
<ImageView
|
||||||
|
android:id="@+id/img_camera4"
|
||||||
|
android:layout_width="30dp"
|
||||||
|
android:layout_height="30dp"
|
||||||
|
android:layout_marginRight="10dp"
|
||||||
|
android:background="@mipmap/camera_orange"/>
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
<View
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="1dp"
|
||||||
|
android:background="@color/grey_dark_background" />
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:id="@+id/lin_category"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:orientation="horizontal"
|
||||||
|
android:padding="5dp"
|
||||||
|
android:weightSum="1"
|
||||||
|
android:visibility="gone">
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:layout_weight=".25"
|
||||||
|
android:orientation="vertical">
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:gravity="center"
|
||||||
|
android:paddingBottom="5dp"
|
||||||
|
android:paddingTop="5dp"
|
||||||
|
android:text="@string/msl_availability_mbq"
|
||||||
|
android:textAppearance="?android:attr/textAppearanceSmall"
|
||||||
|
android:textColor="#222" />
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:layout_weight=".25"
|
||||||
|
android:orientation="vertical">
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:gravity="center"
|
||||||
|
android:paddingBottom="5dp"
|
||||||
|
android:paddingTop="5dp"
|
||||||
|
android:text="@string/msl_availability_availability"
|
||||||
|
android:textAppearance="?android:attr/textAppearanceSmall"
|
||||||
|
android:textColor="#222" />
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:layout_weight=".25"
|
||||||
|
android:orientation="vertical">
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:gravity="center"
|
||||||
|
android:paddingBottom="5dp"
|
||||||
|
android:paddingTop="5dp"
|
||||||
|
android:text="@string/stock_facing_faceup"
|
||||||
|
android:textAppearance="?android:attr/textAppearanceSmall"
|
||||||
|
android:textColor="#222" />
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:layout_weight=".25"
|
||||||
|
android:orientation="vertical">
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:gravity="center"
|
||||||
|
android:paddingBottom="5dp"
|
||||||
|
android:paddingTop="5dp"
|
||||||
|
android:text="@string/stock_facing_stock"
|
||||||
|
android:textAppearance="?android:attr/textAppearanceSmall"
|
||||||
|
android:textColor="#222" />
|
||||||
|
</LinearLayout>
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
<ExpandableListView
|
||||||
|
android:id="@+id/expandableListView"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:cacheColorHint="#00000000"
|
||||||
|
android:divider="@null"
|
||||||
|
android:dividerHeight="0dp"
|
||||||
|
android:scrollingCache="false" />
|
||||||
|
</LinearLayout>
|
||||||
|
</FrameLayout>
|
||||||
@@ -0,0 +1,79 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
xmlns:card_view="http://schemas.android.com/apk/res-auto"
|
||||||
|
android:orientation="vertical"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content">
|
||||||
|
|
||||||
|
<android.support.v7.widget.CardView
|
||||||
|
android:id="@+id/card_view"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_margin="5dp"
|
||||||
|
card_view:cardCornerRadius="5dp"
|
||||||
|
android:elevation="4dp">
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:id="@+id/lin_camera"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:orientation="horizontal"
|
||||||
|
android:weightSum="4"
|
||||||
|
android:layout_marginTop="5dp"
|
||||||
|
android:layout_marginBottom="5dp"
|
||||||
|
>
|
||||||
|
|
||||||
|
<RelativeLayout
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_weight="2">
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/tv_brand"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="@string/brand"
|
||||||
|
android:padding="5dp"
|
||||||
|
android:textSize="@dimen/text_size_small"
|
||||||
|
android:textStyle="bold"
|
||||||
|
android:textColor="@color/colorPrimary"
|
||||||
|
android:layout_centerInParent="true"/>
|
||||||
|
</RelativeLayout>
|
||||||
|
|
||||||
|
<RelativeLayout
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:layout_weight="1">
|
||||||
|
|
||||||
|
<EditText
|
||||||
|
android:id="@+id/et_gsk_facing"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:padding="5dp"
|
||||||
|
android:textSize="@dimen/text_size_medium"
|
||||||
|
android:inputType="number"
|
||||||
|
android:maxLength="5"
|
||||||
|
android:layout_centerInParent="true"/>
|
||||||
|
</RelativeLayout>
|
||||||
|
|
||||||
|
<RelativeLayout
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:layout_weight="1">
|
||||||
|
|
||||||
|
<EditText
|
||||||
|
android:id="@+id/et_competitor_facing"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:padding="5dp"
|
||||||
|
android:textSize="@dimen/text_size_medium"
|
||||||
|
android:inputType="number"
|
||||||
|
android:maxLength="5"
|
||||||
|
android:layout_centerInParent="true"/>
|
||||||
|
</RelativeLayout>
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
</android.support.v7.widget.CardView>
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
@@ -0,0 +1,59 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<LinearLayout
|
||||||
|
android:id="@+id/lin_category"
|
||||||
|
xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:orientation="vertical">
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/txt_skuName"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:paddingBottom="5dp"
|
||||||
|
android:paddingLeft="10dp"
|
||||||
|
android:paddingRight="15dp"
|
||||||
|
android:paddingTop="5dp"
|
||||||
|
android:text="SKU Name Value "
|
||||||
|
android:textAppearance="?android:attr/textAppearanceSmall"
|
||||||
|
android:textColor="#222" />
|
||||||
|
|
||||||
|
<RadioGroup
|
||||||
|
android:id="@+id/radio_group"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:orientation="horizontal"
|
||||||
|
android:layout_gravity="right"
|
||||||
|
android:layout_marginRight="10dp"
|
||||||
|
>
|
||||||
|
|
||||||
|
<RadioButton
|
||||||
|
android:id="@+id/radio_yes"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_margin="5dp"
|
||||||
|
android:button="@null"
|
||||||
|
android:background="@mipmap/yes_white"
|
||||||
|
android:checked="false"
|
||||||
|
/>
|
||||||
|
|
||||||
|
<RadioButton
|
||||||
|
android:id="@+id/radio_no"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_margin="5dp"
|
||||||
|
android:button="@null"
|
||||||
|
android:background="@mipmap/no_white"
|
||||||
|
android:checked="false"
|
||||||
|
/>
|
||||||
|
</RadioGroup>
|
||||||
|
|
||||||
|
<ImageView
|
||||||
|
android:id="@+id/img_cam"
|
||||||
|
android:layout_width="50dp"
|
||||||
|
android:layout_height="50dp"
|
||||||
|
android:background="@mipmap/camera_orange"
|
||||||
|
android:layout_gravity="right"
|
||||||
|
android:layout_marginRight="5dp"
|
||||||
|
android:visibility="gone"/>
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
@@ -0,0 +1,152 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
xmlns:card_view="http://schemas.android.com/apk/res-auto"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:background="@color/white"
|
||||||
|
android:orientation="vertical">
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginLeft="5dp"
|
||||||
|
android:layout_marginRight="5dp"
|
||||||
|
android:layout_marginTop="5dp"
|
||||||
|
android:orientation="vertical">
|
||||||
|
|
||||||
|
<android.support.v7.widget.CardView
|
||||||
|
android:id="@+id/card_view"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
card_view:cardCornerRadius="10dp"
|
||||||
|
android:elevation="5dp">
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:id="@+id/lin_category"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:orientation="vertical"
|
||||||
|
android:paddingBottom="5dp"
|
||||||
|
android:paddingLeft="5dp"
|
||||||
|
android:paddingRight="5dp"
|
||||||
|
android:weightSum="5">
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:layout_weight="2.5"
|
||||||
|
android:orientation="vertical">
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/txt_skuName"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:paddingBottom="5dp"
|
||||||
|
android:paddingLeft="10dp"
|
||||||
|
android:paddingRight="15dp"
|
||||||
|
android:paddingTop="5dp"
|
||||||
|
android:text="SKU Name Value "
|
||||||
|
android:textAppearance="?android:attr/textAppearanceSmall"
|
||||||
|
android:textColor="#222" />
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:orientation="horizontal"
|
||||||
|
android:weightSum="1">
|
||||||
|
|
||||||
|
<!-- <LinearLayout
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:layout_weight=".25"
|
||||||
|
android:orientation="vertical">
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/txt_mbq"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:gravity="center"
|
||||||
|
android:text="0"
|
||||||
|
android:textAppearance="?android:attr/textAppearanceSmall"
|
||||||
|
android:textColor="#222"
|
||||||
|
android:textColorHint="#666" />
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:layout_weight=".25"
|
||||||
|
android:orientation="vertical">
|
||||||
|
|
||||||
|
<ToggleButton
|
||||||
|
android:id="@+id/toggle_available"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_gravity="center"
|
||||||
|
android:background="@drawable/toggle_selector_background"
|
||||||
|
android:textOff="@string/no"
|
||||||
|
android:textOn="@string/yes" />
|
||||||
|
</LinearLayout>
|
||||||
|
-->
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:layout_marginLeft="5dp"
|
||||||
|
android:layout_marginRight="5dp"
|
||||||
|
android:layout_weight=".5"
|
||||||
|
android:gravity="center_vertical"
|
||||||
|
android:orientation="vertical">
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:background="@null"
|
||||||
|
android:gravity="center"
|
||||||
|
android:paddingBottom="5dp"
|
||||||
|
android:paddingTop="5dp"
|
||||||
|
android:hint="@string/stock"
|
||||||
|
android:textAppearance="?android:attr/textAppearanceSmall"
|
||||||
|
android:textColor="#222"
|
||||||
|
android:textColorHint="#666" />
|
||||||
|
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:layout_marginRight="5dp"
|
||||||
|
android:layout_weight=".5"
|
||||||
|
android:gravity="center_vertical"
|
||||||
|
android:orientation="vertical">
|
||||||
|
|
||||||
|
<EditText
|
||||||
|
android:id="@+id/ed_stock"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:background="@null"
|
||||||
|
android:gravity="center"
|
||||||
|
android:inputType="number"
|
||||||
|
android:maxLength="5"
|
||||||
|
android:hint="@string/stock"
|
||||||
|
android:paddingBottom="5dp"
|
||||||
|
android:paddingTop="5dp"
|
||||||
|
android:textAppearance="?android:attr/textAppearanceSmall"
|
||||||
|
android:textColor="#222"
|
||||||
|
android:textColorHint="#666"
|
||||||
|
/>
|
||||||
|
|
||||||
|
<View
|
||||||
|
android:id="@+id/stock_view"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="1dp"
|
||||||
|
android:background="@color/black" />
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
</android.support.v7.widget.CardView>
|
||||||
|
</LinearLayout>
|
||||||
|
</LinearLayout>
|
||||||
@@ -1,6 +1,7 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
xmlns:card_view="http://schemas.android.com/apk/res-auto"
|
xmlns:card_view="http://schemas.android.com/apk/res-auto"
|
||||||
|
xmlns:tools="http://schemas.android.com/tools"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:id="@+id/storenamelistview_layout">
|
android:id="@+id/storenamelistview_layout">
|
||||||
|
|||||||
@@ -48,6 +48,20 @@
|
|||||||
android:title="@string/category_performance_PLANOGRAM"
|
android:title="@string/category_performance_PLANOGRAM"
|
||||||
android:visible="false"/>
|
android:visible="false"/>
|
||||||
|
|
||||||
|
<item
|
||||||
|
android:id="@+id/nav_pharmacy_stores"
|
||||||
|
android:icon="@mipmap/baseline_local_pharmacy_black_48"
|
||||||
|
android:title="@string/pharma_stores"
|
||||||
|
android:visible="false"
|
||||||
|
/>
|
||||||
|
|
||||||
|
<item
|
||||||
|
android:id="@+id/nav_additional_stores"
|
||||||
|
android:icon="@mipmap/outline_library_add_black_48"
|
||||||
|
android:title="@string/additional_stores"
|
||||||
|
android:visible="false"
|
||||||
|
/>
|
||||||
|
|
||||||
<item
|
<item
|
||||||
android:id="@+id/nav_exit"
|
android:id="@+id/nav_exit"
|
||||||
android:icon="@mipmap/exit_grey"
|
android:icon="@mipmap/exit_grey"
|
||||||
|
|||||||
@@ -0,0 +1,10 @@
|
|||||||
|
<menu xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||||
|
xmlns:tools="http://schemas.android.com/tools"
|
||||||
|
tools:context="cpm.com.gskmtorange.pharma_stores.PharmaActivity">
|
||||||
|
<item
|
||||||
|
android:id="@+id/action_settings"
|
||||||
|
android:orderInCategory="100"
|
||||||
|
android:title="@string/action_settings"
|
||||||
|
app:showAsAction="never" />
|
||||||
|
</menu>
|
||||||
|
Before Width: | Height: | Size: 6.4 KiB After Width: | Height: | Size: 11 KiB |
|
After Width: | Height: | Size: 2.8 KiB |
|
After Width: | Height: | Size: 3.4 KiB |
|
After Width: | Height: | Size: 3.5 KiB |
|
After Width: | Height: | Size: 505 B |
|
After Width: | Height: | Size: 2.9 KiB |
|
After Width: | Height: | Size: 3.6 KiB |
|
After Width: | Height: | Size: 3.4 KiB |
|
After Width: | Height: | Size: 473 B |
@@ -10,6 +10,7 @@
|
|||||||
<dimen name="custom_margin">5dp</dimen>
|
<dimen name="custom_margin">5dp</dimen>
|
||||||
|
|
||||||
<dimen name="text_size_normal">20sp</dimen>
|
<dimen name="text_size_normal">20sp</dimen>
|
||||||
|
<dimen name="text_size_medium">18sp</dimen>
|
||||||
<dimen name="text_size_small">16sp</dimen>
|
<dimen name="text_size_small">16sp</dimen>
|
||||||
|
|
||||||
<dimen name="store_entry_text_size">15sp</dimen>
|
<dimen name="store_entry_text_size">15sp</dimen>
|
||||||
|
|||||||
@@ -427,4 +427,22 @@
|
|||||||
<string name="pls_enter_sku">Please enter SKU name</string>
|
<string name="pls_enter_sku">Please enter SKU name</string>
|
||||||
<string name="pls_enter_stock">Please enter Stock</string>
|
<string name="pls_enter_stock">Please enter Stock</string>
|
||||||
|
|
||||||
|
<string name="forget_mpin">Forgot MPin</string>
|
||||||
|
<string name="pls_enter_four_digit_mpin">Please Enter Four Digit MPin</string>
|
||||||
|
<string name="set_mpin">Set MPin</string>
|
||||||
|
<string name="pls_set_four_digit_mpin">Please Set Four Digit MPin</string>
|
||||||
|
<string name="attempt_left">Attempt left</string>
|
||||||
|
<string name="reset">Reset</string>
|
||||||
|
<string name="clear">clear</string>
|
||||||
|
<string name="title_activity_stock">StockActivity</string>
|
||||||
|
|
||||||
|
<!--Pharma Stores -->
|
||||||
|
<string name="pharma_stores">Pharmacy Stores</string>
|
||||||
|
<string name="title_activity_paharma">Pharma Activity</string>
|
||||||
|
<string name="store_detail">Store Detail</string>
|
||||||
|
<string name="additional_stores">Additional Stores</string>
|
||||||
|
<string name="gsk">GSK</string>
|
||||||
|
<string name="competitor">Competitor</string>
|
||||||
|
<string name="sos_detail">SOS Detail</string>
|
||||||
|
|
||||||
</resources>
|
</resources>
|
||||||
|
|||||||
@@ -1,13 +0,0 @@
|
|||||||
/**
|
|
||||||
* Automatically generated file. DO NOT MODIFY
|
|
||||||
*/
|
|
||||||
package com.androidbuts.multispinnerfilter;
|
|
||||||
|
|
||||||
public final class BuildConfig {
|
|
||||||
public static final boolean DEBUG = false;
|
|
||||||
public static final String APPLICATION_ID = "com.androidbuts.multispinnerfilter";
|
|
||||||
public static final String BUILD_TYPE = "release";
|
|
||||||
public static final String FLAVOR = "";
|
|
||||||
public static final int VERSION_CODE = 1;
|
|
||||||
public static final String VERSION_NAME = "1.0";
|
|
||||||
}
|
|
||||||
@@ -1,2 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
<merger version="3"><dataSet config="main" ignore_pattern="!.svn:!.git:!.ds_store:!*.scc:.*:<dir>_*:!CVS:!thumbs.db:!picasa.ini:!*~"><source path="D:\GITHub\GSKORANGEV2\library\src\main\jniLibs"/></dataSet><dataSet config="release" ignore_pattern="!.svn:!.git:!.ds_store:!*.scc:.*:<dir>_*:!CVS:!thumbs.db:!picasa.ini:!*~"><source path="D:\GITHub\GSKORANGEV2\library\src\release\jniLibs"/></dataSet></merger>
|
|
||||||
@@ -1,2 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
<merger version="3"><dataSet config="main" ignore_pattern="!.svn:!.git:!.ds_store:!*.scc:.*:<dir>_*:!CVS:!thumbs.db:!picasa.ini:!*~"><source path="D:\GITHub\GSKORANGEV2\library\src\main\shaders"/></dataSet><dataSet config="release" ignore_pattern="!.svn:!.git:!.ds_store:!*.scc:.*:<dir>_*:!CVS:!thumbs.db:!picasa.ini:!*~"><source path="D:\GITHub\GSKORANGEV2\library\src\release\shaders"/></dataSet></merger>
|
|
||||||
@@ -1,2 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
<merger version="3"><dataSet config="main" ignore_pattern="!.svn:!.git:!.ds_store:!*.scc:.*:<dir>_*:!CVS:!thumbs.db:!picasa.ini:!*~"><source path="D:\GITHub\GSKORANGEV2\library\src\main\assets"/><source path="D:\GITHub\GSKORANGEV2\library\build\intermediates\shader_assets\release\compileReleaseShaders\out"/></dataSet><dataSet config="release" ignore_pattern="!.svn:!.git:!.ds_store:!*.scc:.*:<dir>_*:!CVS:!thumbs.db:!picasa.ini:!*~"><source path="D:\GITHub\GSKORANGEV2\library\src\release\assets"/></dataSet></merger>
|
|
||||||
@@ -1,6 +0,0 @@
|
|||||||
#Fri Mar 15 09:43:47 IST 2019
|
|
||||||
D\:\\GITHub\\GSKORANGEV2\\library\\src\\main\\res\\layout\\item_listview_single.xml=D\:\\GITHub\\GSKORANGEV2\\library\\build\\intermediates\\packaged_res\\release\\layout\\item_listview_single.xml
|
|
||||||
D\:\\GITHub\\GSKORANGEV2\\library\\src\\main\\res\\layout\\item_listview_multiple.xml=D\:\\GITHub\\GSKORANGEV2\\library\\build\\intermediates\\packaged_res\\release\\layout\\item_listview_multiple.xml
|
|
||||||
D\:\\GITHub\\GSKORANGEV2\\library\\src\\main\\res\\layout\\activity_main.xml=D\:\\GITHub\\GSKORANGEV2\\library\\build\\intermediates\\packaged_res\\release\\layout\\activity_main.xml
|
|
||||||
D\:\\GITHub\\GSKORANGEV2\\library\\src\\main\\res\\layout\\alert_dialog_listview_search.xml=D\:\\GITHub\\GSKORANGEV2\\library\\build\\intermediates\\packaged_res\\release\\layout\\alert_dialog_listview_search.xml
|
|
||||||
D\:\\GITHub\\GSKORANGEV2\\library\\src\\main\\res\\layout\\textview_for_spinner.xml=D\:\\GITHub\\GSKORANGEV2\\library\\build\\intermediates\\packaged_res\\release\\layout\\textview_for_spinner.xml
|
|
||||||
@@ -1,25 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
<resources>
|
|
||||||
<style name="DialogWindowTitle">
|
|
||||||
<item name="android:maxLines">1</item>
|
|
||||||
<item name="android:scrollHorizontally">true</item>
|
|
||||||
<item name="android:textAppearance">@android:style/TextAppearance.DialogWindowTitle</item>
|
|
||||||
</style>
|
|
||||||
<style name="MaterialSpinner" parent="Material.Widget.Spinner">
|
|
||||||
<item name="rd_style">@style/Material.Drawable.Ripple.Wave.Light</item>
|
|
||||||
<item name="spn_labelEnable">true</item>
|
|
||||||
<item name="spn_labelTextSize">18sp</item>
|
|
||||||
<item name="spn_arrowSwitchMode">true</item>
|
|
||||||
<item name="spn_arrowAnimDuration">@android:integer/config_shortAnimTime</item>
|
|
||||||
<item name="spn_arrowInterpolator">@android:anim/decelerate_interpolator</item>
|
|
||||||
</style>
|
|
||||||
<style name="myDialog" parent="@android:style/Theme.Holo.Light.Dialog">
|
|
||||||
<item name="android:windowTitleStyle">@style/myDialogTitle</item>
|
|
||||||
</style>
|
|
||||||
<style name="myDialogTitle" parent="@android:style/TextAppearance.DialogWindowTitle">
|
|
||||||
<item name="android:gravity">center_horizontal</item>
|
|
||||||
</style>
|
|
||||||
<declare-styleable name="MultiSpinnerSearch">
|
|
||||||
<attr format="string" name="hintText"/>
|
|
||||||
</declare-styleable>
|
|
||||||
</resources>
|
|
||||||
@@ -1,47 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
<resources>
|
|
||||||
<color name="ColorPrimary">#29CA97</color>
|
|
||||||
<color name="ColorPrimaryDark">#06ACE4</color>
|
|
||||||
<color name="android_text_color">#747474</color>
|
|
||||||
<color name="app_topbar_color">#AAAAAA</color>
|
|
||||||
<color name="background_color">#E1E2E2</color>
|
|
||||||
<color name="black">#000000</color>
|
|
||||||
<color name="blue">#1589FF</color>
|
|
||||||
<color name="cyan">#00FFFF</color>
|
|
||||||
<color name="gray">#D1D0CE</color>
|
|
||||||
<color name="lightBlue">#ADD8E6</color>
|
|
||||||
<color name="list_background">#06ACE4</color>
|
|
||||||
<color name="list_even">#AAAAAA</color>
|
|
||||||
<color name="list_header">#99979C</color>
|
|
||||||
<color name="list_odd">#E1E2E2</color>
|
|
||||||
<color name="list_selected">#455FB6</color>
|
|
||||||
<color name="primary">#3f51b5</color>
|
|
||||||
<color name="primary_dark">#303f9f</color>
|
|
||||||
<color name="primary_pressed">#E1E2E2</color>
|
|
||||||
<color name="red">#FF0000</color>
|
|
||||||
<color name="ripple">#F06292</color>
|
|
||||||
<color name="text_color">#686868</color>
|
|
||||||
<color name="white">#FFFFFF</color>
|
|
||||||
<dimen name="activity_horizontal_margin">16dp</dimen>
|
|
||||||
<dimen name="activity_vertical_margin">16dp</dimen>
|
|
||||||
<string name="type_to_search">Type to Search</string>
|
|
||||||
<style name="DialogWindowTitle">
|
|
||||||
<item name="android:maxLines">1</item>
|
|
||||||
<item name="android:scrollHorizontally">true</item>
|
|
||||||
<item name="android:textAppearance">@android:style/TextAppearance.DialogWindowTitle</item>
|
|
||||||
</style>
|
|
||||||
<style name="MaterialSpinner" parent="Widget.AppCompat.Spinner">
|
|
||||||
<item name="rd_style">@style/Material.Drawable.Ripple.Wave.Light</item>
|
|
||||||
<item name="spn_labelEnable">true</item>
|
|
||||||
<item name="spn_labelTextSize">18sp</item>
|
|
||||||
<item name="spn_arrowSwitchMode">true</item>
|
|
||||||
<item name="spn_arrowAnimDuration">@android:integer/config_shortAnimTime</item>
|
|
||||||
<item name="spn_arrowInterpolator">@android:anim/decelerate_interpolator</item>
|
|
||||||
</style>
|
|
||||||
<style name="myDialog" parent="@android:style/Theme.Holo.Light.Dialog">
|
|
||||||
<item name="android:windowTitleStyle">@style/myDialogTitle</item>
|
|
||||||
</style>
|
|
||||||
<style name="myDialogTitle" parent="@android:style/TextAppearance.DialogWindowTitle">
|
|
||||||
<item name="android:gravity">center_horizontal</item>
|
|
||||||
</style>
|
|
||||||
</resources>
|
|
||||||
@@ -1,34 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
<merger version="3"><dataSet aapt-namespace="http://schemas.android.com/apk/res-auto" config="main$Generated" generated="true" ignore_pattern="!.svn:!.git:!.ds_store:!*.scc:.*:<dir>_*:!CVS:!thumbs.db:!picasa.ini:!*~"><source path="D:\GITHub\GSKORANGEV2\library\src\main\res"/><source path="D:\GITHub\GSKORANGEV2\library\build\generated\res\rs\release"/><source path="D:\GITHub\GSKORANGEV2\library\build\generated\res\resValues\release"/></dataSet><dataSet aapt-namespace="http://schemas.android.com/apk/res-auto" config="main" generated-set="main$Generated" ignore_pattern="!.svn:!.git:!.ds_store:!*.scc:.*:<dir>_*:!CVS:!thumbs.db:!picasa.ini:!*~"><source path="D:\GITHub\GSKORANGEV2\library\src\main\res"><file name="activity_main" path="D:\GITHub\GSKORANGEV2\library\src\main\res\layout\activity_main.xml" qualifiers="" type="layout"/><file name="alert_dialog_listview_search" path="D:\GITHub\GSKORANGEV2\library\src\main\res\layout\alert_dialog_listview_search.xml" qualifiers="" type="layout"/><file name="item_listview_multiple" path="D:\GITHub\GSKORANGEV2\library\src\main\res\layout\item_listview_multiple.xml" qualifiers="" type="layout"/><file name="item_listview_single" path="D:\GITHub\GSKORANGEV2\library\src\main\res\layout\item_listview_single.xml" qualifiers="" type="layout"/><file name="textview_for_spinner" path="D:\GITHub\GSKORANGEV2\library\src\main\res\layout\textview_for_spinner.xml" qualifiers="" type="layout"/><file path="D:\GITHub\GSKORANGEV2\library\src\main\res\values\colors.xml" qualifiers=""><color name="ColorPrimary">#29CA97</color><color name="ColorPrimaryDark">#06ACE4</color><color name="list_background">#06ACE4</color><color name="blue">#1589FF</color><color name="white">#FFFFFF</color><color name="black">#000000</color><color name="gray">#D1D0CE</color><color name="background_color">#E1E2E2</color><color name="primary">#3f51b5</color><color name="primary_pressed">#E1E2E2</color><color name="primary_dark">#303f9f</color><color name="ripple">#F06292</color><color name="red">#FF0000</color><color name="cyan">#00FFFF</color><color name="lightBlue">#ADD8E6</color><color name="text_color">#686868</color><color name="android_text_color">#747474</color><color name="app_topbar_color">#AAAAAA</color><color name="list_even">#AAAAAA</color><color name="list_odd">#E1E2E2</color><color name="list_selected">#455FB6</color><color name="list_header">#99979C</color></file><file path="D:\GITHub\GSKORANGEV2\library\src\main\res\values\dimens.xml" qualifiers=""><dimen name="activity_horizontal_margin">16dp</dimen><dimen name="activity_vertical_margin">16dp</dimen></file><file path="D:\GITHub\GSKORANGEV2\library\src\main\res\values\strings.xml" qualifiers=""><string name="type_to_search">Type to Search</string></file><file path="D:\GITHub\GSKORANGEV2\library\src\main\res\values\styles.xml" qualifiers=""><style name="MaterialSpinner" parent="Widget.AppCompat.Spinner">
|
|
||||||
<item name="rd_style">@style/Material.Drawable.Ripple.Wave.Light</item>
|
|
||||||
<item name="spn_labelEnable">true</item>
|
|
||||||
<item name="spn_labelTextSize">18sp</item>
|
|
||||||
<item name="spn_arrowSwitchMode">true</item>
|
|
||||||
<item name="spn_arrowAnimDuration">@android:integer/config_shortAnimTime</item>
|
|
||||||
<item name="spn_arrowInterpolator">@android:anim/decelerate_interpolator</item>
|
|
||||||
</style><style name="myDialog" parent="@android:style/Theme.Holo.Light.Dialog">
|
|
||||||
<item name="android:windowTitleStyle">@style/myDialogTitle</item>
|
|
||||||
</style><style name="myDialogTitle" parent="@android:style/TextAppearance.DialogWindowTitle">
|
|
||||||
<item name="android:gravity">center_horizontal</item>
|
|
||||||
</style><style name="DialogWindowTitle">
|
|
||||||
<item name="android:maxLines">1</item>
|
|
||||||
<item name="android:scrollHorizontally">true</item>
|
|
||||||
<item name="android:textAppearance">@android:style/TextAppearance.DialogWindowTitle</item>
|
|
||||||
</style></file><file path="D:\GITHub\GSKORANGEV2\library\src\main\res\values-v21\attrs.xml" qualifiers="v21"><declare-styleable name="MultiSpinnerSearch">
|
|
||||||
<attr format="string" name="hintText"/>
|
|
||||||
</declare-styleable></file><file path="D:\GITHub\GSKORANGEV2\library\src\main\res\values-v21\styles.xml" qualifiers="v21"><style name="MaterialSpinner" parent="Material.Widget.Spinner">
|
|
||||||
<item name="rd_style">@style/Material.Drawable.Ripple.Wave.Light</item>
|
|
||||||
<item name="spn_labelEnable">true</item>
|
|
||||||
<item name="spn_labelTextSize">18sp</item>
|
|
||||||
<item name="spn_arrowSwitchMode">true</item>
|
|
||||||
<item name="spn_arrowAnimDuration">@android:integer/config_shortAnimTime</item>
|
|
||||||
<item name="spn_arrowInterpolator">@android:anim/decelerate_interpolator</item>
|
|
||||||
</style><style name="myDialog" parent="@android:style/Theme.Holo.Light.Dialog">
|
|
||||||
<item name="android:windowTitleStyle">@style/myDialogTitle</item>
|
|
||||||
</style><style name="myDialogTitle" parent="@android:style/TextAppearance.DialogWindowTitle">
|
|
||||||
<item name="android:gravity">center_horizontal</item>
|
|
||||||
</style><style name="DialogWindowTitle">
|
|
||||||
<item name="android:maxLines">1</item>
|
|
||||||
<item name="android:scrollHorizontally">true</item>
|
|
||||||
<item name="android:textAppearance">@android:style/TextAppearance.DialogWindowTitle</item>
|
|
||||||
</style></file></source><source path="D:\GITHub\GSKORANGEV2\library\build\generated\res\rs\release"/><source path="D:\GITHub\GSKORANGEV2\library\build\generated\res\resValues\release"/></dataSet><dataSet aapt-namespace="http://schemas.android.com/apk/res-auto" config="release$Generated" generated="true" ignore_pattern="!.svn:!.git:!.ds_store:!*.scc:.*:<dir>_*:!CVS:!thumbs.db:!picasa.ini:!*~"><source path="D:\GITHub\GSKORANGEV2\library\src\release\res"/></dataSet><dataSet aapt-namespace="http://schemas.android.com/apk/res-auto" config="release" generated-set="release$Generated" ignore_pattern="!.svn:!.git:!.ds_store:!*.scc:.*:<dir>_*:!CVS:!thumbs.db:!picasa.ini:!*~"><source path="D:\GITHub\GSKORANGEV2\library\src\release\res"/></dataSet><mergedItems/></merger>
|
|
||||||
@@ -1,19 +0,0 @@
|
|||||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="match_parent"
|
|
||||||
android:orientation="vertical">
|
|
||||||
|
|
||||||
<com.androidbuts.multispinnerfilter.MultiSpinner
|
|
||||||
android:id="@+id/simpleMultiSpinner"
|
|
||||||
android:layout_width="fill_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_margin="20dp" />
|
|
||||||
|
|
||||||
<com.androidbuts.multispinnerfilter.MultiSpinnerSearch
|
|
||||||
android:id="@+id/searchMultiSpinner"
|
|
||||||
android:layout_width="fill_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_margin="20dp"
|
|
||||||
android:layout_marginTop="20dp" />
|
|
||||||
|
|
||||||
</LinearLayout>
|
|
||||||
@@ -1,46 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="match_parent"
|
|
||||||
android:layout_marginLeft="10dp"
|
|
||||||
android:layout_marginRight="10dp"
|
|
||||||
android:gravity="center_horizontal"
|
|
||||||
android:orientation="vertical">
|
|
||||||
|
|
||||||
<EditText
|
|
||||||
android:id="@+id/alertSearchEditText"
|
|
||||||
android:layout_width="fill_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:hint="@string/type_to_search"
|
|
||||||
android:inputType="text">
|
|
||||||
|
|
||||||
<requestFocus />
|
|
||||||
</EditText>
|
|
||||||
|
|
||||||
<RelativeLayout
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:gravity="center_horizontal">
|
|
||||||
|
|
||||||
<ListView
|
|
||||||
android:id="@+id/alertSearchListView"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_marginTop="5dp"
|
|
||||||
android:cacheColorHint="@null"
|
|
||||||
android:fadeScrollbars="true"
|
|
||||||
android:fastScrollEnabled="true"
|
|
||||||
android:textFilterEnabled="true" />
|
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:id="@+id/empty"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_centerHorizontal="true"
|
|
||||||
android:layout_centerVertical="true"
|
|
||||||
android:gravity="center"
|
|
||||||
android:text="Not found!"
|
|
||||||
android:textAppearance="?android:attr/textAppearanceLarge"
|
|
||||||
android:textColor="@color/red" />
|
|
||||||
</RelativeLayout>
|
|
||||||
</LinearLayout>
|
|
||||||
@@ -1,25 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="match_parent"
|
|
||||||
android:padding="15dp">
|
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:id="@+id/alertTextView"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_alignParentLeft="true"
|
|
||||||
android:layout_centerVertical="true"
|
|
||||||
android:layout_toLeftOf="@+id/alertCheckbox"
|
|
||||||
android:text="Item Name"
|
|
||||||
android:textAppearance="?android:attr/textAppearanceMedium" />
|
|
||||||
|
|
||||||
<CheckBox
|
|
||||||
android:id="@+id/alertCheckbox"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_alignParentRight="true"
|
|
||||||
android:layout_centerVertical="true"
|
|
||||||
android:clickable="false" />
|
|
||||||
|
|
||||||
</RelativeLayout>
|
|
||||||
@@ -1,16 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
xmlns:tools="http://schemas.android.com/tools"
|
|
||||||
android:padding="10dp">
|
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:id="@+id/alertTextView"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:singleLine="true"
|
|
||||||
tools:text="Item Name"
|
|
||||||
android:textAppearance="?android:attr/textAppearanceMedium" />
|
|
||||||
|
|
||||||
</LinearLayout>
|
|
||||||
@@ -1,13 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
<TextView xmlns:android="http://schemas.android.com/apk/res/android"
|
|
||||||
xmlns:tools="http://schemas.android.com/tools"
|
|
||||||
android:id="@+id/listTextViewSpinner"
|
|
||||||
android:paddingLeft="5dp"
|
|
||||||
android:paddingTop="10dp"
|
|
||||||
android:paddingBottom="10dp"
|
|
||||||
android:background="@null"
|
|
||||||
android:singleLine="false"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:gravity="center_vertical"
|
|
||||||
android:textColor="#FF000000" />
|
|
||||||
@@ -1,25 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
<resources>
|
|
||||||
<style name="DialogWindowTitle">
|
|
||||||
<item name="android:maxLines">1</item>
|
|
||||||
<item name="android:scrollHorizontally">true</item>
|
|
||||||
<item name="android:textAppearance">@android:style/TextAppearance.DialogWindowTitle</item>
|
|
||||||
</style>
|
|
||||||
<style name="MaterialSpinner" parent="Material.Widget.Spinner">
|
|
||||||
<item name="rd_style">@style/Material.Drawable.Ripple.Wave.Light</item>
|
|
||||||
<item name="spn_labelEnable">true</item>
|
|
||||||
<item name="spn_labelTextSize">18sp</item>
|
|
||||||
<item name="spn_arrowSwitchMode">true</item>
|
|
||||||
<item name="spn_arrowAnimDuration">@android:integer/config_shortAnimTime</item>
|
|
||||||
<item name="spn_arrowInterpolator">@android:anim/decelerate_interpolator</item>
|
|
||||||
</style>
|
|
||||||
<style name="myDialog" parent="@android:style/Theme.Holo.Light.Dialog">
|
|
||||||
<item name="android:windowTitleStyle">@style/myDialogTitle</item>
|
|
||||||
</style>
|
|
||||||
<style name="myDialogTitle" parent="@android:style/TextAppearance.DialogWindowTitle">
|
|
||||||
<item name="android:gravity">center_horizontal</item>
|
|
||||||
</style>
|
|
||||||
<declare-styleable name="MultiSpinnerSearch">
|
|
||||||
<attr format="string" name="hintText"/>
|
|
||||||
</declare-styleable>
|
|
||||||
</resources>
|
|
||||||
@@ -1,47 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
<resources>
|
|
||||||
<color name="ColorPrimary">#29CA97</color>
|
|
||||||
<color name="ColorPrimaryDark">#06ACE4</color>
|
|
||||||
<color name="android_text_color">#747474</color>
|
|
||||||
<color name="app_topbar_color">#AAAAAA</color>
|
|
||||||
<color name="background_color">#E1E2E2</color>
|
|
||||||
<color name="black">#000000</color>
|
|
||||||
<color name="blue">#1589FF</color>
|
|
||||||
<color name="cyan">#00FFFF</color>
|
|
||||||
<color name="gray">#D1D0CE</color>
|
|
||||||
<color name="lightBlue">#ADD8E6</color>
|
|
||||||
<color name="list_background">#06ACE4</color>
|
|
||||||
<color name="list_even">#AAAAAA</color>
|
|
||||||
<color name="list_header">#99979C</color>
|
|
||||||
<color name="list_odd">#E1E2E2</color>
|
|
||||||
<color name="list_selected">#455FB6</color>
|
|
||||||
<color name="primary">#3f51b5</color>
|
|
||||||
<color name="primary_dark">#303f9f</color>
|
|
||||||
<color name="primary_pressed">#E1E2E2</color>
|
|
||||||
<color name="red">#FF0000</color>
|
|
||||||
<color name="ripple">#F06292</color>
|
|
||||||
<color name="text_color">#686868</color>
|
|
||||||
<color name="white">#FFFFFF</color>
|
|
||||||
<dimen name="activity_horizontal_margin">16dp</dimen>
|
|
||||||
<dimen name="activity_vertical_margin">16dp</dimen>
|
|
||||||
<string name="type_to_search">Type to Search</string>
|
|
||||||
<style name="DialogWindowTitle">
|
|
||||||
<item name="android:maxLines">1</item>
|
|
||||||
<item name="android:scrollHorizontally">true</item>
|
|
||||||
<item name="android:textAppearance">@android:style/TextAppearance.DialogWindowTitle</item>
|
|
||||||
</style>
|
|
||||||
<style name="MaterialSpinner" parent="Widget.AppCompat.Spinner">
|
|
||||||
<item name="rd_style">@style/Material.Drawable.Ripple.Wave.Light</item>
|
|
||||||
<item name="spn_labelEnable">true</item>
|
|
||||||
<item name="spn_labelTextSize">18sp</item>
|
|
||||||
<item name="spn_arrowSwitchMode">true</item>
|
|
||||||
<item name="spn_arrowAnimDuration">@android:integer/config_shortAnimTime</item>
|
|
||||||
<item name="spn_arrowInterpolator">@android:anim/decelerate_interpolator</item>
|
|
||||||
</style>
|
|
||||||
<style name="myDialog" parent="@android:style/Theme.Holo.Light.Dialog">
|
|
||||||
<item name="android:windowTitleStyle">@style/myDialogTitle</item>
|
|
||||||
</style>
|
|
||||||
<style name="myDialogTitle" parent="@android:style/TextAppearance.DialogWindowTitle">
|
|
||||||
<item name="android:gravity">center_horizontal</item>
|
|
||||||
</style>
|
|
||||||
</resources>
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
[{"name":"resources","index":0,"scopes":["PROJECT"],"types":["NATIVE_LIBS"],"format":"DIRECTORY","present":false}]
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
[]
|
|
||||||
@@ -1,41 +0,0 @@
|
|||||||
-- Merging decision tree log ---
|
|
||||||
manifest
|
|
||||||
ADDED from D:\GITHub\GSKORANGEV2\library\src\main\AndroidManifest.xml:2:1-9:12
|
|
||||||
INJECTED from D:\GITHub\GSKORANGEV2\library\src\main\AndroidManifest.xml:2:1-9:12
|
|
||||||
INJECTED from D:\GITHub\GSKORANGEV2\library\src\main\AndroidManifest.xml:2:1-9:12
|
|
||||||
INJECTED from D:\GITHub\GSKORANGEV2\library\src\main\AndroidManifest.xml:2:1-9:12
|
|
||||||
INJECTED from D:\GITHub\GSKORANGEV2\library\src\main\AndroidManifest.xml:2:1-9:12
|
|
||||||
INJECTED from D:\GITHub\GSKORANGEV2\library\src\main\AndroidManifest.xml:2:1-9:12
|
|
||||||
INJECTED from D:\GITHub\GSKORANGEV2\library\src\main\AndroidManifest.xml:2:1-9:12
|
|
||||||
package
|
|
||||||
ADDED from D:\GITHub\GSKORANGEV2\library\src\main\AndroidManifest.xml:3:5-49
|
|
||||||
INJECTED from D:\GITHub\GSKORANGEV2\library\src\main\AndroidManifest.xml
|
|
||||||
INJECTED from D:\GITHub\GSKORANGEV2\library\src\main\AndroidManifest.xml
|
|
||||||
android:versionName
|
|
||||||
INJECTED from D:\GITHub\GSKORANGEV2\library\src\main\AndroidManifest.xml
|
|
||||||
ADDED from D:\GITHub\GSKORANGEV2\library\src\main\AndroidManifest.xml:2:1-9:12
|
|
||||||
INJECTED from D:\GITHub\GSKORANGEV2\library\src\main\AndroidManifest.xml
|
|
||||||
android:versionCode
|
|
||||||
INJECTED from D:\GITHub\GSKORANGEV2\library\src\main\AndroidManifest.xml
|
|
||||||
ADDED from D:\GITHub\GSKORANGEV2\library\src\main\AndroidManifest.xml:2:1-9:12
|
|
||||||
INJECTED from D:\GITHub\GSKORANGEV2\library\src\main\AndroidManifest.xml
|
|
||||||
xmlns:android
|
|
||||||
ADDED from D:\GITHub\GSKORANGEV2\library\src\main\AndroidManifest.xml:2:11-69
|
|
||||||
application
|
|
||||||
ADDED from D:\GITHub\GSKORANGEV2\library\src\main\AndroidManifest.xml:5:5-7:19
|
|
||||||
android:allowBackup
|
|
||||||
ADDED from D:\GITHub\GSKORANGEV2\library\src\main\AndroidManifest.xml:5:18-44
|
|
||||||
uses-sdk
|
|
||||||
INJECTED from D:\GITHub\GSKORANGEV2\library\src\main\AndroidManifest.xml reason: use-sdk injection requested
|
|
||||||
INJECTED from D:\GITHub\GSKORANGEV2\library\src\main\AndroidManifest.xml
|
|
||||||
INJECTED from D:\GITHub\GSKORANGEV2\library\src\main\AndroidManifest.xml
|
|
||||||
INJECTED from D:\GITHub\GSKORANGEV2\library\src\main\AndroidManifest.xml
|
|
||||||
INJECTED from D:\GITHub\GSKORANGEV2\library\src\main\AndroidManifest.xml
|
|
||||||
android:targetSdkVersion
|
|
||||||
INJECTED from D:\GITHub\GSKORANGEV2\library\src\main\AndroidManifest.xml
|
|
||||||
ADDED from D:\GITHub\GSKORANGEV2\library\src\main\AndroidManifest.xml
|
|
||||||
INJECTED from D:\GITHub\GSKORANGEV2\library\src\main\AndroidManifest.xml
|
|
||||||
android:minSdkVersion
|
|
||||||
INJECTED from D:\GITHub\GSKORANGEV2\library\src\main\AndroidManifest.xml
|
|
||||||
ADDED from D:\GITHub\GSKORANGEV2\library\src\main\AndroidManifest.xml
|
|
||||||
INJECTED from D:\GITHub\GSKORANGEV2\library\src\main\AndroidManifest.xml
|
|
||||||