Merge branch 'master' into ysy_upload_new
@@ -68,7 +68,6 @@
|
|||||||
android:label="@string/title_activity_store_geotag"
|
android:label="@string/title_activity_store_geotag"
|
||||||
android:screenOrientation="portrait"
|
android:screenOrientation="portrait"
|
||||||
android:theme="@style/AppTheme.NoActionBar" />
|
android:theme="@style/AppTheme.NoActionBar" />
|
||||||
|
|
||||||
<meta-data
|
<meta-data
|
||||||
android:name="com.google.android.maps.v2.API_KEY"
|
android:name="com.google.android.maps.v2.API_KEY"
|
||||||
android:value="AIzaSyD02po19go2JMhXJeAnKDiZSiNloPsWqzI" />
|
android:value="AIzaSyD02po19go2JMhXJeAnKDiZSiNloPsWqzI" />
|
||||||
@@ -121,6 +120,12 @@
|
|||||||
android:theme="@style/AppTheme.NoActionBar"
|
android:theme="@style/AppTheme.NoActionBar"
|
||||||
android:windowSoftInputMode="adjustPan" />
|
android:windowSoftInputMode="adjustPan" />
|
||||||
|
|
||||||
|
<activity
|
||||||
|
android:name=".gsk_dailyentry.StoreWisePerformanceActivity"
|
||||||
|
android:configChanges="screenSize|orientation|keyboardHidden"
|
||||||
|
android:screenOrientation="portrait"
|
||||||
|
android:theme="@style/AppTheme.NoActionBar"
|
||||||
|
android:windowSoftInputMode="adjustPan" />
|
||||||
<!-- Gagan End Declaration -->
|
<!-- Gagan End Declaration -->
|
||||||
|
|
||||||
<activity
|
<activity
|
||||||
@@ -128,21 +133,21 @@
|
|||||||
android:configChanges="screenSize|orientation|keyboardHidden"
|
android:configChanges="screenSize|orientation|keyboardHidden"
|
||||||
android:label="@string/title_activity_Non_Work"
|
android:label="@string/title_activity_Non_Work"
|
||||||
android:screenOrientation="portrait"
|
android:screenOrientation="portrait"
|
||||||
android:theme="@style/AppTheme.NoActionBar"></activity>
|
android:theme="@style/AppTheme.NoActionBar"/>
|
||||||
|
|
||||||
|
<activity
|
||||||
<activity
|
|
||||||
android:name=".dailyentry.AdditionalVisibility"
|
android:name=".dailyentry.AdditionalVisibility"
|
||||||
android:configChanges="screenSize|orientation|keyboardHidden"
|
android:configChanges="screenSize|orientation|keyboardHidden"
|
||||||
android:label="@string/title_activity_Additional_visibility"
|
android:label="@string/title_activity_Additional_visibility"
|
||||||
android:screenOrientation="portrait"
|
android:screenOrientation="portrait"
|
||||||
android:theme="@style/AppTheme.NoActionBar"></activity>
|
android:theme="@style/AppTheme.NoActionBar"/>
|
||||||
|
|
||||||
<activity
|
<activity
|
||||||
android:name=".upload.UploadActivity"
|
android:name=".upload.UploadActivity"
|
||||||
android:configChanges="screenSize|orientation|keyboardHidden"
|
android:configChanges="screenSize|orientation|keyboardHidden"
|
||||||
android:label="@string/title_activity_upload"
|
android:label="@string/title_activity_upload"
|
||||||
android:screenOrientation="portrait" />
|
android:screenOrientation="portrait" />
|
||||||
|
|
||||||
|
|
||||||
</application>
|
</application>
|
||||||
|
|
||||||
|
|||||||
@@ -15,7 +15,10 @@ import cpm.com.gskmtorange.GetterSetter.AddittionalGetterSetter;
|
|||||||
import cpm.com.gskmtorange.GetterSetter.CoverageBean;
|
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.xmlGetterSetter.CategoryWisePerformaceGetterSetter;
|
||||||
import cpm.com.gskmtorange.GetterSetter.AdditionalDialogGetterSetter;
|
import cpm.com.gskmtorange.GetterSetter.AdditionalDialogGetterSetter;
|
||||||
|
|
||||||
|
import cpm.com.gskmtorange.xmlGetterSetter.MAPPING_PLANOGRAM_MasterGetterSetter;
|
||||||
import cpm.com.gskmtorange.xmlGetterSetter.NonWorkingReasonGetterSetter;
|
import cpm.com.gskmtorange.xmlGetterSetter.NonWorkingReasonGetterSetter;
|
||||||
import cpm.com.gskmtorange.constant.CommonString;
|
import cpm.com.gskmtorange.constant.CommonString;
|
||||||
import cpm.com.gskmtorange.xmlGetterSetter.BrandMasterGetterSetter;
|
import cpm.com.gskmtorange.xmlGetterSetter.BrandMasterGetterSetter;
|
||||||
@@ -32,9 +35,11 @@ import cpm.com.gskmtorange.xmlGetterSetter.MappingDisplayChecklistGetterSetter;
|
|||||||
import cpm.com.gskmtorange.xmlGetterSetter.MappingPromotionGetterSetter;
|
import cpm.com.gskmtorange.xmlGetterSetter.MappingPromotionGetterSetter;
|
||||||
import cpm.com.gskmtorange.xmlGetterSetter.MappingStockGetterSetter;
|
import cpm.com.gskmtorange.xmlGetterSetter.MappingStockGetterSetter;
|
||||||
import cpm.com.gskmtorange.xmlGetterSetter.Promo_Compliance_DataGetterSetter;
|
import cpm.com.gskmtorange.xmlGetterSetter.Promo_Compliance_DataGetterSetter;
|
||||||
|
import cpm.com.gskmtorange.xmlGetterSetter.STORE_PERFORMANCE_MasterGetterSetter;
|
||||||
import cpm.com.gskmtorange.xmlGetterSetter.SkuGetterSetter;
|
import cpm.com.gskmtorange.xmlGetterSetter.SkuGetterSetter;
|
||||||
import cpm.com.gskmtorange.xmlGetterSetter.SkuMasterGetterSetter;
|
import cpm.com.gskmtorange.xmlGetterSetter.SkuMasterGetterSetter;
|
||||||
import cpm.com.gskmtorange.xmlGetterSetter.Stock_FacingGetterSetter;
|
import cpm.com.gskmtorange.xmlGetterSetter.Stock_FacingGetterSetter;
|
||||||
|
import cpm.com.gskmtorange.xmlGetterSetter.StoreWisePerformaceGetterSetter;
|
||||||
import cpm.com.gskmtorange.xmlGetterSetter.SubCategoryMasterGetterSetter;
|
import cpm.com.gskmtorange.xmlGetterSetter.SubCategoryMasterGetterSetter;
|
||||||
import cpm.com.gskmtorange.xmlGetterSetter.T2PGetterSetter;
|
import cpm.com.gskmtorange.xmlGetterSetter.T2PGetterSetter;
|
||||||
import cpm.com.gskmtorange.xmlGetterSetter.TableBean;
|
import cpm.com.gskmtorange.xmlGetterSetter.TableBean;
|
||||||
@@ -46,8 +51,8 @@ import cpm.com.gskmtorange.xmlGetterSetter.TableBean;
|
|||||||
public class GSKOrangeDB extends SQLiteOpenHelper {
|
public class GSKOrangeDB extends SQLiteOpenHelper {
|
||||||
public static final String DATABASE_NAME = "GSK_ORANGE";
|
public static final String DATABASE_NAME = "GSK_ORANGE";
|
||||||
public static final int DATABASE_VERSION = 13;
|
public static final int DATABASE_VERSION = 13;
|
||||||
private SQLiteDatabase db;
|
|
||||||
TableBean tableBean;
|
TableBean tableBean;
|
||||||
|
private SQLiteDatabase db;
|
||||||
|
|
||||||
public GSKOrangeDB(Context context) {
|
public GSKOrangeDB(Context context) {
|
||||||
super(context, DATABASE_NAME, null, DATABASE_VERSION);
|
super(context, DATABASE_NAME, null, DATABASE_VERSION);
|
||||||
@@ -91,6 +96,8 @@ public class GSKOrangeDB extends SQLiteOpenHelper {
|
|||||||
db.execSQL(CommonString.CREATE_TABLE_INSERT_ADDITIONAL_PROMO_COMPLIANCE);
|
db.execSQL(CommonString.CREATE_TABLE_INSERT_ADDITIONAL_PROMO_COMPLIANCE);
|
||||||
db.execSQL(CommonString.CREATE_TABLE_INSERT_PROMO_SKU);
|
db.execSQL(CommonString.CREATE_TABLE_INSERT_PROMO_SKU);
|
||||||
|
|
||||||
|
db.execSQL(TableBean.getStorePerformance());
|
||||||
|
|
||||||
//Gagan End
|
//Gagan End
|
||||||
|
|
||||||
db.execSQL(CommonString.CREATE_TABLE_STORE_GEOTAGGING);
|
db.execSQL(CommonString.CREATE_TABLE_STORE_GEOTAGGING);
|
||||||
@@ -104,6 +111,8 @@ public class GSKOrangeDB extends SQLiteOpenHelper {
|
|||||||
db.execSQL(CommonString.CREATE_TABLE_INSERT_T2P_COMPLIANCE);
|
db.execSQL(CommonString.CREATE_TABLE_INSERT_T2P_COMPLIANCE);
|
||||||
db.execSQL(CommonString.CREATE_TABLE_INSERT_T2P_GAPS);
|
db.execSQL(CommonString.CREATE_TABLE_INSERT_T2P_GAPS);
|
||||||
db.execSQL(CommonString.CREATE_TABLE_INSERT_T2P_SKU);
|
db.execSQL(CommonString.CREATE_TABLE_INSERT_T2P_SKU);
|
||||||
|
|
||||||
|
db.execSQL(TableBean.getMappingPlanogram());
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -111,7 +120,10 @@ public class GSKOrangeDB extends SQLiteOpenHelper {
|
|||||||
db.execSQL("DROP TABLE IF EXISTS " + TableBean.getJourneyPlan());
|
db.execSQL("DROP TABLE IF EXISTS " + TableBean.getJourneyPlan());
|
||||||
}
|
}
|
||||||
|
|
||||||
public void deleteTableWithStoreID(String storeid, String process_id) {
|
public void deleteTableWithStoreID(String storeid) {
|
||||||
|
|
||||||
|
db.delete(CommonString.TABLE_COVERAGE_DATA, CommonString.KEY_STORE_ID + "='" + storeid + "'", null);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public void deleteAllTables() {
|
public void deleteAllTables() {
|
||||||
@@ -911,7 +923,7 @@ public class GSKOrangeDB extends SQLiteOpenHelper {
|
|||||||
cd.setMrp(dbcursor.getString(dbcursor.getColumnIndexOrThrow("MRP")));
|
cd.setMrp(dbcursor.getString(dbcursor.getColumnIndexOrThrow("MRP")));
|
||||||
cd.setSku_sequence(dbcursor.getString(dbcursor.getColumnIndexOrThrow("SKU_SEQUENCE")));
|
cd.setSku_sequence(dbcursor.getString(dbcursor.getColumnIndexOrThrow("SKU_SEQUENCE")));
|
||||||
cd.setMbq(dbcursor.getString(dbcursor.getColumnIndexOrThrow("MBQ")));
|
cd.setMbq(dbcursor.getString(dbcursor.getColumnIndexOrThrow("MBQ")));
|
||||||
cd.setToggleValue("0");
|
cd.setToggleValue("1");
|
||||||
|
|
||||||
list.add(cd);
|
list.add(cd);
|
||||||
dbcursor.moveToNext();
|
dbcursor.moveToNext();
|
||||||
@@ -1008,11 +1020,7 @@ public class GSKOrangeDB extends SQLiteOpenHelper {
|
|||||||
}
|
}
|
||||||
dbcursor.close();
|
dbcursor.close();
|
||||||
|
|
||||||
if (list.size() > 0) {
|
return list.size() > 0;
|
||||||
return true;
|
|
||||||
} else {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
Log.d("Exception ", "when fetching Records!!!!!!!!!!!!!!!!!!!!!" + e.toString());
|
Log.d("Exception ", "when fetching Records!!!!!!!!!!!!!!!!!!!!!" + e.toString());
|
||||||
@@ -1054,7 +1062,7 @@ public class GSKOrangeDB extends SQLiteOpenHelper {
|
|||||||
Cursor dbcursor = null;
|
Cursor dbcursor = null;
|
||||||
|
|
||||||
try {
|
try {
|
||||||
dbcursor = db.rawQuery("Select DISTINCT SB.SUB_CATEGORY_ID,SB.SUB_CATEGORY,BR.BRAND_ID,BR.BRAND " +
|
dbcursor = db.rawQuery("Select DISTINCT SB.SUB_CATEGORY_ID,SB.SUB_CATEGORY,BR.BRAND_ID,BR.BRAND,BR.COMPANY_ID " +
|
||||||
"from MAPPING_STOCK M " +
|
"from MAPPING_STOCK M " +
|
||||||
"inner join SKU_MASTER SK " +
|
"inner join SKU_MASTER SK " +
|
||||||
"on M.SKU_ID=SK.SKU_ID " +
|
"on M.SKU_ID=SK.SKU_ID " +
|
||||||
@@ -1065,13 +1073,14 @@ 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 + "' " +
|
"where CA.CATEGORY_ID='" + category_id + "' " +
|
||||||
"order by SB.SUB_CATEGORY,BR.BRAND", null);
|
"order by SB.SUB_CATEGORY,BR.COMPANY_ID,BR.BRAND", null);
|
||||||
|
|
||||||
if (dbcursor != null) {
|
if (dbcursor != null) {
|
||||||
dbcursor.moveToFirst();
|
dbcursor.moveToFirst();
|
||||||
while (!dbcursor.isAfterLast()) {
|
while (!dbcursor.isAfterLast()) {
|
||||||
Stock_FacingGetterSetter cd = new Stock_FacingGetterSetter();
|
Stock_FacingGetterSetter cd = new Stock_FacingGetterSetter();
|
||||||
|
|
||||||
|
cd.setCompany_id(dbcursor.getString(dbcursor.getColumnIndexOrThrow("COMPANY_ID")));
|
||||||
cd.setSub_category_id(dbcursor.getString(dbcursor.getColumnIndexOrThrow("SUB_CATEGORY_ID")));
|
cd.setSub_category_id(dbcursor.getString(dbcursor.getColumnIndexOrThrow("SUB_CATEGORY_ID")));
|
||||||
cd.setSub_category(dbcursor.getString(dbcursor.getColumnIndexOrThrow("SUB_CATEGORY")));
|
cd.setSub_category(dbcursor.getString(dbcursor.getColumnIndexOrThrow("SUB_CATEGORY")));
|
||||||
cd.setBrand_id(dbcursor.getString(dbcursor.getColumnIndexOrThrow("BRAND_ID")));
|
cd.setBrand_id(dbcursor.getString(dbcursor.getColumnIndexOrThrow("BRAND_ID")));
|
||||||
@@ -1149,6 +1158,7 @@ public class GSKOrangeDB extends SQLiteOpenHelper {
|
|||||||
|
|
||||||
values1.put("Store_Id", storeId);
|
values1.put("Store_Id", storeId);
|
||||||
values1.put("Category_Id", categoryId);
|
values1.put("Category_Id", categoryId);
|
||||||
|
values1.put("COMPANY_ID", data1.getCompany_id());
|
||||||
values1.put("SUB_CATEGORY_ID", data1.getSub_category_id());
|
values1.put("SUB_CATEGORY_ID", data1.getSub_category_id());
|
||||||
values1.put("SUB_CATEGORY", data1.getSub_category());
|
values1.put("SUB_CATEGORY", data1.getSub_category());
|
||||||
values1.put("BRAND_ID", data1.getBrand_id());
|
values1.put("BRAND_ID", data1.getBrand_id());
|
||||||
@@ -1195,6 +1205,7 @@ public class GSKOrangeDB extends SQLiteOpenHelper {
|
|||||||
while (!dbcursor.isAfterLast()) {
|
while (!dbcursor.isAfterLast()) {
|
||||||
Stock_FacingGetterSetter cd = new Stock_FacingGetterSetter();
|
Stock_FacingGetterSetter cd = new Stock_FacingGetterSetter();
|
||||||
|
|
||||||
|
cd.setCompany_id(dbcursor.getString(dbcursor.getColumnIndexOrThrow("COMPANY_ID")));
|
||||||
cd.setSub_category_id(dbcursor.getString(dbcursor.getColumnIndexOrThrow("SUB_CATEGORY_ID")));
|
cd.setSub_category_id(dbcursor.getString(dbcursor.getColumnIndexOrThrow("SUB_CATEGORY_ID")));
|
||||||
cd.setSub_category(dbcursor.getString(dbcursor.getColumnIndexOrThrow("SUB_CATEGORY")));
|
cd.setSub_category(dbcursor.getString(dbcursor.getColumnIndexOrThrow("SUB_CATEGORY")));
|
||||||
cd.setBrand_id(dbcursor.getString(dbcursor.getColumnIndexOrThrow("BRAND_ID")));
|
cd.setBrand_id(dbcursor.getString(dbcursor.getColumnIndexOrThrow("BRAND_ID")));
|
||||||
@@ -1303,11 +1314,7 @@ public class GSKOrangeDB extends SQLiteOpenHelper {
|
|||||||
}
|
}
|
||||||
dbcursor.close();
|
dbcursor.close();
|
||||||
|
|
||||||
if (list.size() > 0) {
|
return list.size() > 0;
|
||||||
return true;
|
|
||||||
} else {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
Log.d("Exception ", "when fetching Records!!!!!!!!!!!!!!!!!!!!!" + e.toString());
|
Log.d("Exception ", "when fetching Records!!!!!!!!!!!!!!!!!!!!!" + e.toString());
|
||||||
@@ -1521,7 +1528,6 @@ public class GSKOrangeDB extends SQLiteOpenHelper {
|
|||||||
return list;
|
return list;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public void InsertPromoSkuData(ArrayList<Promo_Compliance_DataGetterSetter> promoSkuListData, String category_id) {
|
public void InsertPromoSkuData(ArrayList<Promo_Compliance_DataGetterSetter> promoSkuListData, String category_id) {
|
||||||
ContentValues values = new ContentValues();
|
ContentValues values = new ContentValues();
|
||||||
try {
|
try {
|
||||||
@@ -1568,11 +1574,7 @@ public class GSKOrangeDB extends SQLiteOpenHelper {
|
|||||||
}
|
}
|
||||||
dbcursor.close();
|
dbcursor.close();
|
||||||
|
|
||||||
if (list.size() > 0) {
|
return list.size() > 0;
|
||||||
return true;
|
|
||||||
} else {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
Log.d("Exception ", "when fetching Records!!!!!!!!!!!!!!!!!!!!!" + e.toString());
|
Log.d("Exception ", "when fetching Records!!!!!!!!!!!!!!!!!!!!!" + e.toString());
|
||||||
@@ -1670,7 +1672,8 @@ public class GSKOrangeDB extends SQLiteOpenHelper {
|
|||||||
try {
|
try {
|
||||||
|
|
||||||
dbcursor = db.rawQuery("SELECT * from JOURNEY_PLAN " +
|
dbcursor = db.rawQuery("SELECT * from JOURNEY_PLAN " +
|
||||||
"where VISIT_DATE ='" + date + "' AND STORE_ID='"+ store_id +"'", null);
|
"where VISIT_DATE ='" + date + "' AND STORE_ID='" + store_id + "'", null);
|
||||||
|
|
||||||
|
|
||||||
if (dbcursor != null) {
|
if (dbcursor != null) {
|
||||||
dbcursor.moveToFirst();
|
dbcursor.moveToFirst();
|
||||||
@@ -1997,9 +2000,112 @@ public class GSKOrangeDB extends SQLiteOpenHelper {
|
|||||||
}
|
}
|
||||||
return list;
|
return list;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//Store wise Performance
|
||||||
|
public void InsertSTORE_PERFORMANCE(STORE_PERFORMANCE_MasterGetterSetter data) {
|
||||||
|
db.delete("STORE_PERFORMANCE", 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("CATEGORY_ID", data.getCATEGORY_ID().get(i));
|
||||||
|
values.put("PERIOD", data.getPERIOD().get(i));
|
||||||
|
values.put("MSL_AVAILABILITY", data.getMSL_AVAILABILITY().get(i));
|
||||||
|
values.put("SOS", data.getSOS().get(i));
|
||||||
|
values.put("T2P", data.getT2P().get(i));
|
||||||
|
values.put("PROMO", data.getPROMO().get(i));
|
||||||
|
values.put("OSS", data.getOSS().get(i));
|
||||||
|
values.put("ORDERID", data.getORDERID().get(i));
|
||||||
|
|
||||||
|
db.insert("STORE_PERFORMANCE", null, values);
|
||||||
|
}
|
||||||
|
} catch (Exception ex) {
|
||||||
|
Log.d("Exception ", " STORE_PERFORMANCE " + ex.toString());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
//Category wise Performance
|
||||||
|
public ArrayList<CategoryWisePerformaceGetterSetter> getCategoryWisePerformance(String store_id, String category_id) {
|
||||||
|
ArrayList<CategoryWisePerformaceGetterSetter> list = new ArrayList<>();
|
||||||
|
Cursor dbcursor = null;
|
||||||
|
|
||||||
|
try {
|
||||||
|
dbcursor = db.rawQuery("Select * from STORE_PERFORMANCE " +
|
||||||
|
"where STORE_ID='" + store_id + "' and CATEGORY_ID='" + category_id + "'", null);
|
||||||
|
|
||||||
|
if (dbcursor != null) {
|
||||||
|
dbcursor.moveToFirst();
|
||||||
|
while (!dbcursor.isAfterLast()) {
|
||||||
|
CategoryWisePerformaceGetterSetter cd = new CategoryWisePerformaceGetterSetter();
|
||||||
|
|
||||||
|
cd.setStore_id(dbcursor.getString(dbcursor.getColumnIndexOrThrow("STORE_ID")));
|
||||||
|
cd.setCategory_id(dbcursor.getString(dbcursor.getColumnIndexOrThrow("CATEGORY_ID")));
|
||||||
|
cd.setPeriod(dbcursor.getString(dbcursor.getColumnIndexOrThrow("PERIOD")));
|
||||||
|
cd.setMsl_availability(dbcursor.getString(dbcursor.getColumnIndexOrThrow("MSL_AVAILABILITY")));
|
||||||
|
cd.setSos(dbcursor.getString(dbcursor.getColumnIndexOrThrow("SOS")));
|
||||||
|
cd.setT2p(dbcursor.getString(dbcursor.getColumnIndexOrThrow("T2P")));
|
||||||
|
cd.setPromo(dbcursor.getString(dbcursor.getColumnIndexOrThrow("PROMO")));
|
||||||
|
cd.setOss(dbcursor.getString(dbcursor.getColumnIndexOrThrow("OSS")));
|
||||||
|
cd.setOrder_id(dbcursor.getString(dbcursor.getColumnIndexOrThrow("ORDERID")));
|
||||||
|
|
||||||
|
list.add(cd);
|
||||||
|
dbcursor.moveToNext();
|
||||||
|
}
|
||||||
|
dbcursor.close();
|
||||||
|
return list;
|
||||||
|
}
|
||||||
|
} catch (Exception e) {
|
||||||
|
Log.d("Exception ", "getPromoComplianceSkuData!" + e.toString());
|
||||||
|
return list;
|
||||||
|
}
|
||||||
|
return list;
|
||||||
|
}
|
||||||
|
|
||||||
|
public ArrayList<StoreWisePerformaceGetterSetter> getStoreWisePerformance(String store_id) {
|
||||||
|
ArrayList<StoreWisePerformaceGetterSetter> list = new ArrayList<>();
|
||||||
|
Cursor dbcursor = null;
|
||||||
|
|
||||||
|
try {
|
||||||
|
dbcursor = db.rawQuery("Select PERIOD, ROUND(avg(MSL_AVAILABILITY),1) as MSL_AVAILABILITY,ROUND(avg(sos),1) as SOS ," +
|
||||||
|
" ROUND(avg(t2p),1) as T2P,ROUND(avg(pROMO),1) as PROMO,ROUND(SUM(oss),1) AS OSS " +
|
||||||
|
"from STORE_PERFORMANCE " +
|
||||||
|
"where STORE_ID='" + store_id + "' " +
|
||||||
|
"GROUP BY PERIOD " +
|
||||||
|
"ORDER BY ORDERID ", null);
|
||||||
|
|
||||||
|
if (dbcursor != null) {
|
||||||
|
dbcursor.moveToFirst();
|
||||||
|
while (!dbcursor.isAfterLast()) {
|
||||||
|
StoreWisePerformaceGetterSetter cd = new StoreWisePerformaceGetterSetter();
|
||||||
|
|
||||||
|
/* cd.setStore_id(dbcursor.getString(dbcursor.getColumnIndexOrThrow("STORE_ID")));
|
||||||
|
cd.setCategory_id(dbcursor.getString(dbcursor.getColumnIndexOrThrow("CATEGORY_ID")));*/
|
||||||
|
cd.setPeriod(dbcursor.getString(dbcursor.getColumnIndexOrThrow("PERIOD")));
|
||||||
|
cd.setMsl_availability(dbcursor.getString(dbcursor.getColumnIndexOrThrow("MSL_AVAILABILITY")));
|
||||||
|
cd.setSos(dbcursor.getString(dbcursor.getColumnIndexOrThrow("SOS")));
|
||||||
|
cd.setT2p(dbcursor.getString(dbcursor.getColumnIndexOrThrow("T2P")));
|
||||||
|
cd.setPromo(dbcursor.getString(dbcursor.getColumnIndexOrThrow("PROMO")));
|
||||||
|
cd.setOss(dbcursor.getString(dbcursor.getColumnIndexOrThrow("OSS")));
|
||||||
|
// cd.setOrder_id(dbcursor.getString(dbcursor.getColumnIndexOrThrow("ORDERID")));
|
||||||
|
|
||||||
|
list.add(cd);
|
||||||
|
dbcursor.moveToNext();
|
||||||
|
}
|
||||||
|
dbcursor.close();
|
||||||
|
return list;
|
||||||
|
}
|
||||||
|
} catch (Exception e) {
|
||||||
|
Log.d("Exception ", "getPromoComplianceSkuData!" + e.toString());
|
||||||
|
return list;
|
||||||
|
}
|
||||||
|
return list;
|
||||||
|
}
|
||||||
|
|
||||||
//Gagan end new code 1
|
//Gagan end new code 1
|
||||||
|
|
||||||
public void InsertStockDialog(AdditionalDialogGetterSetter data) {
|
public void InsertStockDialog(AdditionalDialogGetterSetter data) {
|
||||||
ContentValues values = new ContentValues();
|
ContentValues values = new ContentValues();
|
||||||
|
|
||||||
try {
|
try {
|
||||||
@@ -2009,16 +2115,16 @@ public class GSKOrangeDB extends SQLiteOpenHelper {
|
|||||||
values.put(CommonString.KEY_BRAND, data.getBrand());
|
values.put(CommonString.KEY_BRAND, data.getBrand());
|
||||||
values.put(CommonString.KEY_BRAND_ID, data.getBrand_id());
|
values.put(CommonString.KEY_BRAND_ID, data.getBrand_id());
|
||||||
|
|
||||||
// values.put(CommonString.KEY_DISPLAY_ID, data.getDisplay_id());
|
// values.put(CommonString.KEY_DISPLAY_ID, data.getDisplay_id());
|
||||||
|
|
||||||
values.put(CommonString.KEY_QUANTITY, data.getQuantity());
|
values.put(CommonString.KEY_QUANTITY, data.getQuantity());
|
||||||
values.put(CommonString.KEY_SKU_ID, data.getSku_id());
|
values.put(CommonString.KEY_SKU_ID, data.getSku_id());
|
||||||
values.put(CommonString.KEY_SKUNAME, data.getSku_name());
|
values.put(CommonString.KEY_SKUNAME, data.getSku_name());
|
||||||
// values.put(CommonString.UNIQUE_KEY_ID, data.getUnique_id());
|
// values.put(CommonString.UNIQUE_KEY_ID, data.getUnique_id());
|
||||||
|
|
||||||
// values.put(CommonString.KEY_CATEGORY_ID, data.getCategory_id());
|
// values.put(CommonString.KEY_CATEGORY_ID, data.getCategory_id());
|
||||||
|
|
||||||
// values.put(CommonString.KEY_PROCESS_ID, data.getProcess_id());
|
// values.put(CommonString.KEY_PROCESS_ID, data.getProcess_id());
|
||||||
|
|
||||||
|
|
||||||
db.insert(CommonString.TABLE_INSERT_STOCK_DIALOG, null, values);
|
db.insert(CommonString.TABLE_INSERT_STOCK_DIALOG, null, values);
|
||||||
@@ -2036,7 +2142,7 @@ public class GSKOrangeDB extends SQLiteOpenHelper {
|
|||||||
|
|
||||||
try {
|
try {
|
||||||
|
|
||||||
cursordata = db.rawQuery("SELECT * FROM STOCK_DIALOG WHERE COMMON_ID = '"+keyid + "'", null);
|
cursordata = db.rawQuery("SELECT * FROM STOCK_DIALOG WHERE COMMON_ID = '" + keyid + "'", null);
|
||||||
|
|
||||||
if (cursordata != null) {
|
if (cursordata != null) {
|
||||||
cursordata.moveToFirst();
|
cursordata.moveToFirst();
|
||||||
@@ -2059,7 +2165,7 @@ public class GSKOrangeDB extends SQLiteOpenHelper {
|
|||||||
sb.setSku_id(cursordata.getString(cursordata
|
sb.setSku_id(cursordata.getString(cursordata
|
||||||
.getColumnIndexOrThrow(CommonString.KEY_SKU_ID)));
|
.getColumnIndexOrThrow(CommonString.KEY_SKU_ID)));
|
||||||
|
|
||||||
sb.setSku_name(cursordata.getString(cursordata
|
sb.setSku_name(cursordata.getString(cursordata
|
||||||
.getColumnIndexOrThrow(CommonString.KEY_SKUNAME)));
|
.getColumnIndexOrThrow(CommonString.KEY_SKUNAME)));
|
||||||
|
|
||||||
|
|
||||||
@@ -2097,8 +2203,6 @@ public class GSKOrangeDB extends SQLiteOpenHelper {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
public ArrayList<BrandMasterGetterSetter> getBrandMasterData(String store_id) {
|
public ArrayList<BrandMasterGetterSetter> getBrandMasterData(String store_id) {
|
||||||
Cursor cursordata = null;
|
Cursor cursordata = null;
|
||||||
ArrayList<BrandMasterGetterSetter> Data = new ArrayList<BrandMasterGetterSetter>();
|
ArrayList<BrandMasterGetterSetter> Data = new ArrayList<BrandMasterGetterSetter>();
|
||||||
@@ -2119,7 +2223,6 @@ public class GSKOrangeDB extends SQLiteOpenHelper {
|
|||||||
sb.setSUB_CATEGORY_ID(cursordata.getString(cursordata.getColumnIndexOrThrow("SUB_CATEGORY_ID")));
|
sb.setSUB_CATEGORY_ID(cursordata.getString(cursordata.getColumnIndexOrThrow("SUB_CATEGORY_ID")));
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
sb.setCOMPANY_ID(cursordata.getString(cursordata.getColumnIndexOrThrow("COMPANY_ID")));
|
sb.setCOMPANY_ID(cursordata.getString(cursordata.getColumnIndexOrThrow("COMPANY_ID")));
|
||||||
|
|
||||||
sb.setBRAND_SEQUENCE(cursordata.getString(cursordata.getColumnIndexOrThrow("BRAND_SEQUENCE")));
|
sb.setBRAND_SEQUENCE(cursordata.getString(cursordata.getColumnIndexOrThrow("BRAND_SEQUENCE")));
|
||||||
@@ -2140,7 +2243,6 @@ public class GSKOrangeDB extends SQLiteOpenHelper {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
public ArrayList<SkuMasterGetterSetter> getSKUMasterData(String store_id) {
|
public ArrayList<SkuMasterGetterSetter> getSKUMasterData(String store_id) {
|
||||||
Cursor cursordata = null;
|
Cursor cursordata = null;
|
||||||
ArrayList<SkuMasterGetterSetter> Data = new ArrayList<SkuMasterGetterSetter>();
|
ArrayList<SkuMasterGetterSetter> Data = new ArrayList<SkuMasterGetterSetter>();
|
||||||
@@ -2161,7 +2263,6 @@ public class GSKOrangeDB extends SQLiteOpenHelper {
|
|||||||
sb.setBRAND_ID(cursordata.getString(cursordata.getColumnIndexOrThrow("BRAND_ID")));
|
sb.setBRAND_ID(cursordata.getString(cursordata.getColumnIndexOrThrow("BRAND_ID")));
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
sb.setMRP(cursordata.getString(cursordata.getColumnIndexOrThrow("MRP")));
|
sb.setMRP(cursordata.getString(cursordata.getColumnIndexOrThrow("MRP")));
|
||||||
|
|
||||||
sb.setSKU_SEQUENCE(cursordata.getString(cursordata.getColumnIndexOrThrow("SKU_SEQUENCE")));
|
sb.setSKU_SEQUENCE(cursordata.getString(cursordata.getColumnIndexOrThrow("SKU_SEQUENCE")));
|
||||||
@@ -2181,7 +2282,7 @@ public class GSKOrangeDB extends SQLiteOpenHelper {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public void InsertAdditionalData(AddittionalGetterSetter data,ArrayList<AdditionalDialogGetterSetter> dialog) {
|
public void InsertAdditionalData(AddittionalGetterSetter data, ArrayList<AdditionalDialogGetterSetter> dialog) {
|
||||||
ContentValues values = new ContentValues();
|
ContentValues values = new ContentValues();
|
||||||
ContentValues values1 = new ContentValues();
|
ContentValues values1 = new ContentValues();
|
||||||
try {
|
try {
|
||||||
@@ -2195,10 +2296,9 @@ public class GSKOrangeDB extends SQLiteOpenHelper {
|
|||||||
values.put("sku_name", data.getSku());
|
values.put("sku_name", data.getSku());
|
||||||
values.put("toggle_value", data.getBtn_toogle());
|
values.put("toggle_value", data.getBtn_toogle());
|
||||||
|
|
||||||
long key_id = db.insert(CommonString.TABLE_INSERT_STOCK_ADDITIONAL, null, values);
|
long key_id = db.insert(CommonString.TABLE_INSERT_STOCK_ADDITIONAL, null, values);
|
||||||
|
|
||||||
for(int i=0;i<dialog.size();i++)
|
for (int i = 0; i < dialog.size(); i++) {
|
||||||
{
|
|
||||||
values1.put(CommonString.KEY_Common_ID, key_id);
|
values1.put(CommonString.KEY_Common_ID, key_id);
|
||||||
values1.put(CommonString.KEY_STORE_ID, dialog.get(i).getStore_id());
|
values1.put(CommonString.KEY_STORE_ID, dialog.get(i).getStore_id());
|
||||||
values1.put(CommonString.KEY_BRAND, dialog.get(i).getBrand());
|
values1.put(CommonString.KEY_BRAND, dialog.get(i).getBrand());
|
||||||
@@ -2211,16 +2311,9 @@ public class GSKOrangeDB extends SQLiteOpenHelper {
|
|||||||
db.insert(CommonString.TABLE_INSERT_STOCK_DIALOG, null, values1);
|
db.insert(CommonString.TABLE_INSERT_STOCK_DIALOG, null, values1);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
} catch (Exception ex) {
|
} catch (Exception ex) {
|
||||||
Log.d("Database Exception ", ex.getMessage());
|
Log.d("Database Exception ", ex.getMessage());
|
||||||
}
|
}
|
||||||
@@ -2234,7 +2327,7 @@ public class GSKOrangeDB extends SQLiteOpenHelper {
|
|||||||
|
|
||||||
try {
|
try {
|
||||||
|
|
||||||
cursordata = db.rawQuery("SELECT * FROM Stock_Additional_visibility WHERE Store_Id = '"+store_id + "'", null);
|
cursordata = db.rawQuery("SELECT * FROM Stock_Additional_visibility WHERE Store_Id = '" + store_id + "'", null);
|
||||||
|
|
||||||
|
|
||||||
if (cursordata != null) {
|
if (cursordata != null) {
|
||||||
@@ -2265,6 +2358,9 @@ public class GSKOrangeDB extends SQLiteOpenHelper {
|
|||||||
|
|
||||||
sb.setSku(cursordata.getString(cursordata
|
sb.setSku(cursordata.getString(cursordata
|
||||||
.getColumnIndexOrThrow("sku_name")));
|
.getColumnIndexOrThrow("sku_name")));
|
||||||
|
sb.setBtn_toogle(cursordata.getString(cursordata
|
||||||
|
.getColumnIndexOrThrow("toggle_value")));
|
||||||
|
|
||||||
|
|
||||||
productData.add(sb);
|
productData.add(sb);
|
||||||
cursordata.moveToNext();
|
cursordata.moveToNext();
|
||||||
@@ -2281,6 +2377,20 @@ public class GSKOrangeDB extends SQLiteOpenHelper {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void updateStoreStatus(String storeid, String visitdate,
|
||||||
|
String status) {
|
||||||
|
|
||||||
|
try {
|
||||||
|
ContentValues values = new ContentValues();
|
||||||
|
values.put(CommonString.KEY_CHECKOUT_STATUS, status);
|
||||||
|
|
||||||
|
db.update("JOURNEY_PLAN", values, CommonString.KEY_STORE_ID + "='" + storeid + "' AND " + CommonString.KEY_VISIT_DATE + "='" + visitdate + "'", null);
|
||||||
|
} catch (Exception e) {
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public void InsertT2PData(ArrayList<T2PGetterSetter> data, String store_id, String category_id) {
|
public void InsertT2PData(ArrayList<T2PGetterSetter> data, String store_id, String category_id) {
|
||||||
db.delete(CommonString.TABLE_INSERT_T2P_COMPLIANCE, CommonString.KEY_STORE_ID + "='" + store_id + "' AND " + CommonString.KEY_CATEGORY_ID + "='" + category_id + "'", null);
|
db.delete(CommonString.TABLE_INSERT_T2P_COMPLIANCE, CommonString.KEY_STORE_ID + "='" + store_id + "' AND " + CommonString.KEY_CATEGORY_ID + "='" + category_id + "'", null);
|
||||||
|
|
||||||
@@ -2447,4 +2557,27 @@ public class GSKOrangeDB extends SQLiteOpenHelper {
|
|||||||
return list;
|
return list;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//Gagan start new code 2
|
||||||
|
|
||||||
|
public void InsertMAPPING_PLANOGRAM(MAPPING_PLANOGRAM_MasterGetterSetter data) {
|
||||||
|
db.delete("MAPPING_PLANOGRAM", null, null);
|
||||||
|
|
||||||
|
ContentValues values = new ContentValues();
|
||||||
|
try {
|
||||||
|
for (int i = 0; i < data.getKEYACCOUNT_ID().size(); i++) {
|
||||||
|
|
||||||
|
values.put("KEYACCOUNT_ID", data.getKEYACCOUNT_ID().get(i));
|
||||||
|
values.put("STORETYPE_ID", data.getSTORETYPE_ID().get(i));
|
||||||
|
values.put("CLASS_ID", data.getCLASS_ID().get(i));
|
||||||
|
values.put("PLANOGRAM_IMAGE", data.getPLANOGRAM_IMAGE().get(i));
|
||||||
|
values.put("IMAGE_PATH", data.getIMAGE_PATH().get(i));
|
||||||
|
|
||||||
|
db.insert("MAPPING_PLANOGRAM", null, values);
|
||||||
|
}
|
||||||
|
} catch (Exception ex) {
|
||||||
|
Log.d("Exception ", " MAPPING_PLANOGRAM " + ex.toString());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
//Gagan end new code 2
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -265,7 +265,7 @@ public class MainActivity extends AppCompatActivity
|
|||||||
|
|
||||||
} else if (id == R.id.nav_setting) {
|
} else if (id == R.id.nav_setting) {
|
||||||
|
|
||||||
startActivity(new Intent(MainActivity.this, CategoryListActivity.class));
|
//startActivity(new Intent(MainActivity.this, CategoryListActivity.class));
|
||||||
|
|
||||||
} /*else if (id == R.id.nav_export) {
|
} /*else if (id == R.id.nav_export) {
|
||||||
|
|
||||||
|
|||||||
@@ -235,6 +235,9 @@ public class CommonString {
|
|||||||
+ "Category_Id"
|
+ "Category_Id"
|
||||||
+ " VARCHAR,"
|
+ " VARCHAR,"
|
||||||
|
|
||||||
|
+ "COMPANY_ID"
|
||||||
|
+ " VARCHAR,"
|
||||||
|
|
||||||
+ "SUB_CATEGORY_ID"
|
+ "SUB_CATEGORY_ID"
|
||||||
+ " VARCHAR,"
|
+ " VARCHAR,"
|
||||||
|
|
||||||
|
|||||||
@@ -114,7 +114,7 @@ public class AdditionalVisibility extends AppCompatActivity implements View.OnCl
|
|||||||
store_id = preferences.getString(CommonString.KEY_STORE_ID, null);
|
store_id = preferences.getString(CommonString.KEY_STORE_ID, null);
|
||||||
|
|
||||||
|
|
||||||
store_id = "1";
|
store_id = "2";
|
||||||
date = preferences.getString(CommonString.KEY_DATE, null);
|
date = preferences.getString(CommonString.KEY_DATE, null);
|
||||||
intime = preferences.getString(CommonString.KEY_STORE_IN_TIME, "");
|
intime = preferences.getString(CommonString.KEY_STORE_IN_TIME, "");
|
||||||
|
|
||||||
@@ -255,6 +255,7 @@ public class AdditionalVisibility extends AppCompatActivity implements View.OnCl
|
|||||||
|
|
||||||
btntoggle.setChecked(true);
|
btntoggle.setChecked(true);
|
||||||
|
|
||||||
|
btnimage.setBackgroundResource(R.mipmap.camera);
|
||||||
togglevalue = "1";
|
togglevalue = "1";
|
||||||
brandlayout.setVisibility(View.VISIBLE);
|
brandlayout.setVisibility(View.VISIBLE);
|
||||||
diaplylayout.setVisibility(View.VISIBLE);
|
diaplylayout.setVisibility(View.VISIBLE);
|
||||||
@@ -611,10 +612,9 @@ public class AdditionalVisibility extends AppCompatActivity implements View.OnCl
|
|||||||
|
|
||||||
if (_pathforcheck != null && !_pathforcheck.equals("")) {
|
if (_pathforcheck != null && !_pathforcheck.equals("")) {
|
||||||
if (new File(str + _pathforcheck).exists()) {
|
if (new File(str + _pathforcheck).exists()) {
|
||||||
// Bitmap bmp = BitmapFactory.decodeFile(str + _pathforcheck);
|
|
||||||
// img_cam.setImageBitmap(bmp);
|
btnimage.setBackgroundResource(R.mipmap.camera_done);
|
||||||
// img_clicked.setVisibility(View.GONE);
|
|
||||||
// img_cam.setVisibility(View.VISIBLE);
|
|
||||||
img_str = _pathforcheck;
|
img_str = _pathforcheck;
|
||||||
_pathforcheck = "";
|
_pathforcheck = "";
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -42,6 +42,7 @@ import cpm.com.gskmtorange.GetterSetter.StoreBean;
|
|||||||
import cpm.com.gskmtorange.R;
|
import cpm.com.gskmtorange.R;
|
||||||
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.CategoryListActivity;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Created by ashishc on 29-12-2016.
|
* Created by ashishc on 29-12-2016.
|
||||||
@@ -250,7 +251,6 @@ public class StoreListActivity extends AppCompatActivity {
|
|||||||
|
|
||||||
store_id = current.getSTORE_ID();
|
store_id = current.getSTORE_ID();
|
||||||
|
|
||||||
|
|
||||||
if (current.getUPLOAD_STATUS().equalsIgnoreCase(CommonString.KEY_U)) {
|
if (current.getUPLOAD_STATUS().equalsIgnoreCase(CommonString.KEY_U)) {
|
||||||
Snackbar.make(v, R.string.title_store_list_activity_store_already_done, Snackbar.LENGTH_LONG).setAction("Action", null).show();
|
Snackbar.make(v, R.string.title_store_list_activity_store_already_done, Snackbar.LENGTH_LONG).setAction("Action", null).show();
|
||||||
} else if (current.getUPLOAD_STATUS().equalsIgnoreCase(CommonString.KEY_D)) {
|
} else if (current.getUPLOAD_STATUS().equalsIgnoreCase(CommonString.KEY_D)) {
|
||||||
@@ -361,13 +361,29 @@ public class StoreListActivity extends AppCompatActivity {
|
|||||||
public void onCheckedChanged(RadioGroup group, int checkedId) {
|
public void onCheckedChanged(RadioGroup group, int checkedId) {
|
||||||
// find which radio button is selected
|
// find which radio button is selected
|
||||||
if (checkedId == R.id.yes) {
|
if (checkedId == R.id.yes) {
|
||||||
|
boolean flag=true;
|
||||||
Intent in = new Intent(StoreListActivity.this, StoreimageActivity.class);
|
if(coverage.size()>0) {
|
||||||
startActivity(in);
|
for (int i = 0; i < coverage.size(); i++) {
|
||||||
|
if (store_id.equals(coverage.get(i).getStoreId())) {
|
||||||
overridePendingTransition(R.anim.activity_in, R.anim.activity_out);
|
flag=false;
|
||||||
|
break;
|
||||||
dialog.cancel();
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if(flag==true)
|
||||||
|
{
|
||||||
|
Intent in = new Intent(StoreListActivity.this, StoreimageActivity.class);
|
||||||
|
startActivity(in);
|
||||||
|
overridePendingTransition(R.anim.activity_in, R.anim.activity_out);
|
||||||
|
dialog.cancel();
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
Intent in=new Intent(StoreListActivity.this,CategoryListActivity.class);
|
||||||
|
startActivity(in);
|
||||||
|
overridePendingTransition(R.anim.activity_in, R.anim.activity_out);
|
||||||
|
dialog.cancel();
|
||||||
|
}
|
||||||
|
|
||||||
} else if (checkedId == R.id.no) {
|
} else if (checkedId == R.id.no) {
|
||||||
|
|
||||||
@@ -383,6 +399,9 @@ public class StoreListActivity extends AppCompatActivity {
|
|||||||
int id) {
|
int id) {
|
||||||
|
|
||||||
|
|
||||||
|
UpdateStore(store_id);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
Intent in = new Intent(StoreListActivity.this, NonWorkingReason.class);
|
Intent in = new Intent(StoreListActivity.this, NonWorkingReason.class);
|
||||||
startActivity(in);
|
startActivity(in);
|
||||||
@@ -404,8 +423,6 @@ public class StoreListActivity extends AppCompatActivity {
|
|||||||
} else {
|
} else {
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
Intent in = new Intent(StoreListActivity.this, NonWorkingReason.class);
|
Intent in = new Intent(StoreListActivity.this, NonWorkingReason.class);
|
||||||
startActivity(in);
|
startActivity(in);
|
||||||
}
|
}
|
||||||
@@ -439,5 +456,12 @@ public class StoreListActivity extends AppCompatActivity {
|
|||||||
return result_flag;
|
return result_flag;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void UpdateStore(String storeid) {
|
||||||
|
|
||||||
|
db.open();
|
||||||
|
db.deleteTableWithStoreID(storeid);
|
||||||
|
|
||||||
|
db.updateStoreStatus(storeid, storelist.get(0).getVISIT_DATE(), "N");
|
||||||
|
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -40,6 +40,7 @@ import cpm.com.gskmtorange.constant.CommonString;
|
|||||||
import cpm.com.gskmtorange.Database.GSKOrangeDB;
|
import cpm.com.gskmtorange.Database.GSKOrangeDB;
|
||||||
import cpm.com.gskmtorange.GetterSetter.CoverageBean;
|
import cpm.com.gskmtorange.GetterSetter.CoverageBean;
|
||||||
import cpm.com.gskmtorange.gsk_dailyentry.CategoryListActivity;
|
import cpm.com.gskmtorange.gsk_dailyentry.CategoryListActivity;
|
||||||
|
import cpm.com.gskmtorange.gsk_dailyentry.StoreWisePerformanceActivity;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Created by ashishc on 31-05-2016.
|
* Created by ashishc on 31-05-2016.
|
||||||
@@ -198,7 +199,8 @@ public class StoreimageActivity extends AppCompatActivity implements View.OnClic
|
|||||||
editor.commit();*/
|
editor.commit();*/
|
||||||
|
|
||||||
|
|
||||||
Intent in = new Intent(StoreimageActivity.this, CategoryListActivity.class);
|
//Intent in = new Intent(StoreimageActivity.this, CategoryListActivity.class);
|
||||||
|
Intent in = new Intent(StoreimageActivity.this, StoreWisePerformanceActivity.class);
|
||||||
startActivity(in);
|
startActivity(in);
|
||||||
finish();
|
finish();
|
||||||
}
|
}
|
||||||
@@ -268,8 +270,7 @@ public class StoreimageActivity extends AppCompatActivity implements View.OnClic
|
|||||||
intent.putExtra(MediaStore.EXTRA_OUTPUT, outputFileUri);
|
intent.putExtra(MediaStore.EXTRA_OUTPUT, outputFileUri);
|
||||||
intent.setPackage(defaultCameraPackage);
|
intent.setPackage(defaultCameraPackage);
|
||||||
startActivityForResult(intent, 0);
|
startActivityForResult(intent, 0);
|
||||||
}
|
} catch (ActivityNotFoundException e) {
|
||||||
catch (ActivityNotFoundException e) {
|
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
|
|
||||||
Intent intent = new Intent(MediaStore.ACTION_IMAGE_CAPTURE);
|
Intent intent = new Intent(MediaStore.ACTION_IMAGE_CAPTURE);
|
||||||
@@ -277,8 +278,7 @@ public class StoreimageActivity extends AppCompatActivity implements View.OnClic
|
|||||||
intent.setPackage(gallery_package);
|
intent.setPackage(gallery_package);
|
||||||
startActivityForResult(intent, 0);
|
startActivityForResult(intent, 0);
|
||||||
|
|
||||||
}
|
} catch (Exception e) {
|
||||||
catch (Exception e) {
|
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -72,14 +72,11 @@ public class T2PComplianceActivity extends AppCompatActivity {
|
|||||||
RecyclerView rec_t2p;
|
RecyclerView rec_t2p;
|
||||||
|
|
||||||
String categoryName, categoryId;
|
String categoryName, categoryId;
|
||||||
|
|
||||||
private SharedPreferences preferences;
|
|
||||||
String store_id, visit_date, username, intime, date, keyAccount_id, class_id, storeType_id, camera_allow;
|
String store_id, visit_date, username, intime, date, keyAccount_id, class_id, storeType_id, camera_allow;
|
||||||
|
|
||||||
String path = "", str = CommonString.FILE_PATH, _pathforcheck = "", img = "";
|
String path = "", str = CommonString.FILE_PATH, _pathforcheck = "", img = "";
|
||||||
int child_position = -1;
|
int child_position = -1;
|
||||||
|
|
||||||
String error_msg;
|
String error_msg;
|
||||||
|
private SharedPreferences preferences;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void onCreate(Bundle savedInstanceState) {
|
protected void onCreate(Bundle savedInstanceState) {
|
||||||
@@ -310,6 +307,7 @@ public class T2PComplianceActivity extends AppCompatActivity {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public void showGapsDialog(final T2PGetterSetter t2p) {
|
public void showGapsDialog(final T2PGetterSetter t2p) {
|
||||||
|
|
||||||
final ArrayList<GapsChecklistGetterSetter> gapsChecklist;
|
final ArrayList<GapsChecklistGetterSetter> gapsChecklist;
|
||||||
@@ -504,191 +502,6 @@ public class T2PComplianceActivity extends AppCompatActivity {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public class GapsAdapter extends RecyclerView.Adapter<GapsAdapter.ViewHolder> {
|
|
||||||
|
|
||||||
private ArrayList<GapsChecklistGetterSetter> list;
|
|
||||||
|
|
||||||
public GapsAdapter(ArrayList<GapsChecklistGetterSetter> gapsPList) {
|
|
||||||
list = gapsPList;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public ViewHolder onCreateViewHolder(ViewGroup parent, int viewType) {
|
|
||||||
View view = LayoutInflater.from(parent.getContext())
|
|
||||||
.inflate(R.layout.gap_checklist_item, parent, false);
|
|
||||||
return new ViewHolder(view);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void onBindViewHolder(final ViewHolder holder, int position) {
|
|
||||||
|
|
||||||
final GapsChecklistGetterSetter mItem = list.get(position);
|
|
||||||
holder.tv_checklist.setText(mItem.getChecklist());
|
|
||||||
|
|
||||||
holder.tb_present.setOnClickListener(new View.OnClickListener() {
|
|
||||||
@Override
|
|
||||||
public void onClick(View v) {
|
|
||||||
|
|
||||||
mItem.setPresent(((ToggleButton) v).getText().toString().equalsIgnoreCase("Yes"));
|
|
||||||
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
holder.tb_present.setChecked(mItem.isPresent());
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public int getItemCount() {
|
|
||||||
return list.size();
|
|
||||||
}
|
|
||||||
|
|
||||||
public class ViewHolder extends RecyclerView.ViewHolder {
|
|
||||||
public final View mView;
|
|
||||||
public final LinearLayout parentLayout;
|
|
||||||
public final TextView tv_checklist;
|
|
||||||
public final ToggleButton tb_present;
|
|
||||||
|
|
||||||
|
|
||||||
public ViewHolder(View view) {
|
|
||||||
super(view);
|
|
||||||
|
|
||||||
mView = view;
|
|
||||||
|
|
||||||
tv_checklist = (TextView) mView.findViewById(R.id.tv_checklist);
|
|
||||||
tb_present = (ToggleButton) mView.findViewById(R.id.btn_is_present);
|
|
||||||
parentLayout = (LinearLayout) mView.findViewById(R.id.parent_layout);
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
public class CustomAdapter extends ArrayAdapter<String> {
|
|
||||||
|
|
||||||
private Activity activity;
|
|
||||||
private ArrayList data;
|
|
||||||
BrandMasterGetterSetter tempValues = null;
|
|
||||||
LayoutInflater inflater;
|
|
||||||
|
|
||||||
/*************
|
|
||||||
* CustomAdapter Constructor
|
|
||||||
*****************/
|
|
||||||
public CustomAdapter(
|
|
||||||
T2PComplianceActivity activitySpinner,
|
|
||||||
int textViewResourceId,
|
|
||||||
ArrayList objects
|
|
||||||
|
|
||||||
) {
|
|
||||||
super(activitySpinner, textViewResourceId, objects);
|
|
||||||
|
|
||||||
/********** Take passed values **********/
|
|
||||||
activity = activitySpinner;
|
|
||||||
data = objects;
|
|
||||||
/*********** Layout inflator to call external xml layout () **********************/
|
|
||||||
inflater = (LayoutInflater) activity.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public View getDropDownView(int position, View convertView, ViewGroup parent) {
|
|
||||||
return getCustomView(position, convertView, parent);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public View getView(int position, View convertView, ViewGroup parent) {
|
|
||||||
return getCustomView(position, convertView, parent);
|
|
||||||
}
|
|
||||||
|
|
||||||
// This funtion called for each row ( Called data.size() times )
|
|
||||||
public View getCustomView(int position, View convertView, ViewGroup parent) {
|
|
||||||
|
|
||||||
/********** Inflate spinner_rows.xml file for each row ( Defined below ) ************/
|
|
||||||
View row = inflater.inflate(R.layout.custom_spinner_item, parent, false);
|
|
||||||
|
|
||||||
/***** Get each Model object from Arraylist ********/
|
|
||||||
tempValues = null;
|
|
||||||
tempValues = (BrandMasterGetterSetter) data.get(position);
|
|
||||||
|
|
||||||
TextView label = (TextView) row.findViewById(R.id.tv_text);
|
|
||||||
|
|
||||||
if (position == 0) {
|
|
||||||
|
|
||||||
// Default selected Spinner item
|
|
||||||
label.setText("Select");
|
|
||||||
//sub.setText("");
|
|
||||||
} else {
|
|
||||||
// Set values for spinner each row
|
|
||||||
label.setText(tempValues.getBRAND().get(0));
|
|
||||||
}
|
|
||||||
|
|
||||||
return row;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public class CustomSkuAdapter extends ArrayAdapter<String> {
|
|
||||||
|
|
||||||
private Activity activity;
|
|
||||||
private ArrayList data;
|
|
||||||
SkuGetterSetter tempValues = null;
|
|
||||||
LayoutInflater inflater;
|
|
||||||
|
|
||||||
/*************
|
|
||||||
* CustomAdapter Constructor
|
|
||||||
*****************/
|
|
||||||
public CustomSkuAdapter(
|
|
||||||
T2PComplianceActivity activitySpinner,
|
|
||||||
int textViewResourceId,
|
|
||||||
ArrayList objects
|
|
||||||
|
|
||||||
) {
|
|
||||||
super(activitySpinner, textViewResourceId, objects);
|
|
||||||
|
|
||||||
/********** Take passed values **********/
|
|
||||||
activity = activitySpinner;
|
|
||||||
data = objects;
|
|
||||||
/*********** Layout inflator to call external xml layout () **********************/
|
|
||||||
inflater = (LayoutInflater) activity.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public View getDropDownView(int position, View convertView, ViewGroup parent) {
|
|
||||||
return getCustomView(position, convertView, parent);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public View getView(int position, View convertView, ViewGroup parent) {
|
|
||||||
return getCustomView(position, convertView, parent);
|
|
||||||
}
|
|
||||||
|
|
||||||
// This funtion called for each row ( Called data.size() times )
|
|
||||||
public View getCustomView(int position, View convertView, ViewGroup parent) {
|
|
||||||
|
|
||||||
/********** Inflate spinner_rows.xml file for each row ( Defined below ) ************/
|
|
||||||
View row = inflater.inflate(R.layout.custom_spinner_item, parent, false);
|
|
||||||
|
|
||||||
/***** Get each Model object from Arraylist ********/
|
|
||||||
tempValues = null;
|
|
||||||
tempValues = (SkuGetterSetter) data.get(position);
|
|
||||||
|
|
||||||
TextView label = (TextView) row.findViewById(R.id.tv_text);
|
|
||||||
|
|
||||||
if (position == 0) {
|
|
||||||
|
|
||||||
// Default selected Spinner item
|
|
||||||
label.setText("Select");
|
|
||||||
//sub.setText("");
|
|
||||||
} else {
|
|
||||||
// Set values for spinner each row
|
|
||||||
label.setText(tempValues.getSKU());
|
|
||||||
}
|
|
||||||
|
|
||||||
return row;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean onOptionsItemSelected(MenuItem item) {
|
public boolean onOptionsItemSelected(MenuItem item) {
|
||||||
// Handle action bar item clicks here. The action bar will
|
// Handle action bar item clicks here. The action bar will
|
||||||
@@ -794,6 +607,371 @@ public class T2PComplianceActivity extends AppCompatActivity {
|
|||||||
super.onActivityResult(requestCode, resultCode, data);
|
super.onActivityResult(requestCode, resultCode, data);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public boolean isValid() {
|
||||||
|
boolean flag = true;
|
||||||
|
|
||||||
|
for (int i = 0; i < t2PGetterSetters.size(); i++) {
|
||||||
|
|
||||||
|
if (camera_allow.equals("1") && t2PGetterSetters.get(i).getImage().equals("")) {
|
||||||
|
flag = false;
|
||||||
|
error_msg = getResources().getString(R.string.click_image);
|
||||||
|
break;
|
||||||
|
} else if (t2PGetterSetters.get(i).getGapsChecklist().size() == 0) {
|
||||||
|
flag = false;
|
||||||
|
error_msg = getResources().getString(R.string.fill_gaps_data);
|
||||||
|
break;
|
||||||
|
} else if (t2PGetterSetters.get(i).getSkulist().size() == 0) {
|
||||||
|
flag = false;
|
||||||
|
error_msg = getResources().getString(R.string.fill_sku_data);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return flag;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onBackPressed() {
|
||||||
|
//super.onBackPressed();
|
||||||
|
|
||||||
|
android.app.AlertDialog.Builder builder = new android.app.AlertDialog.Builder(T2PComplianceActivity.this);
|
||||||
|
builder.setTitle("Parinaam");
|
||||||
|
builder.setMessage(getResources().getString(R.string.data_will_be_lost)).setCancelable(false)
|
||||||
|
.setPositiveButton("OK", new DialogInterface.OnClickListener() {
|
||||||
|
public void onClick(DialogInterface dialog, int id) {
|
||||||
|
|
||||||
|
finish();
|
||||||
|
}
|
||||||
|
})
|
||||||
|
.setNegativeButton("Cancel ", new DialogInterface.OnClickListener() {
|
||||||
|
@Override
|
||||||
|
public void onClick(DialogInterface dialog, int which) {
|
||||||
|
|
||||||
|
}
|
||||||
|
});
|
||||||
|
android.app.AlertDialog alert = builder.create();
|
||||||
|
alert.show();
|
||||||
|
}
|
||||||
|
|
||||||
|
public class T2PAdapter extends RecyclerView.Adapter<T2PAdapter.ViewHolder> {
|
||||||
|
|
||||||
|
private ArrayList<T2PGetterSetter> list;
|
||||||
|
|
||||||
|
public T2PAdapter(ArrayList<T2PGetterSetter> t2PList) {
|
||||||
|
list = t2PList;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public ViewHolder onCreateViewHolder(ViewGroup parent, int viewType) {
|
||||||
|
View view = LayoutInflater.from(parent.getContext())
|
||||||
|
.inflate(R.layout.t2p_item_layout, parent, false);
|
||||||
|
return new ViewHolder(view);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onBindViewHolder(final ViewHolder holder, final int position) {
|
||||||
|
|
||||||
|
final T2PGetterSetter mItem = list.get(position);
|
||||||
|
holder.tv_brand.setText(mItem.getBrand());
|
||||||
|
holder.tv_display.setText(mItem.getDisplay().trim());
|
||||||
|
|
||||||
|
//holder.tv_display.setTypeface(FontManager.getTypeface(getApplicationContext(),FontManager.FONTAWESOME));
|
||||||
|
|
||||||
|
/* Typeface iconFont = FontManager.getTypeface(getApplicationContext(), FontManager.FONTAWESOME);
|
||||||
|
FontManager.markAsIconContainer(findViewById(R.id.icons_container), iconFont);
|
||||||
|
*/
|
||||||
|
holder.btn_gaps.setOnClickListener(new View.OnClickListener() {
|
||||||
|
@Override
|
||||||
|
public void onClick(View v) {
|
||||||
|
|
||||||
|
showGapsDialog(mItem);
|
||||||
|
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
holder.toggle_btn.setOnClickListener(new View.OnClickListener() {
|
||||||
|
@Override
|
||||||
|
public void onClick(View v) {
|
||||||
|
|
||||||
|
mItem.setPresent(((ToggleButton) v).getText().toString().equalsIgnoreCase("Yes"));
|
||||||
|
|
||||||
|
t2PAdapter.notifyDataSetChanged();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
|
holder.btn_sku.setOnClickListener(new View.OnClickListener() {
|
||||||
|
@Override
|
||||||
|
public void onClick(View v) {
|
||||||
|
showSkuDialog(mItem.getSkulist());
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
if (!img.equalsIgnoreCase("")) {
|
||||||
|
if (position == child_position) {
|
||||||
|
mItem.setImage(img);
|
||||||
|
img = "";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if(camera_allow.equals("1")){
|
||||||
|
|
||||||
|
holder.img_cam.setOnClickListener(new View.OnClickListener() {
|
||||||
|
@Override
|
||||||
|
public void onClick(View v) {
|
||||||
|
_pathforcheck = "T2P_Image_" + store_id + "_" + mItem.getBrand_id() + mItem.getDisplay_id() + visit_date.replace("/", "") + "_" + getCurrentTime().replace(":", "") + ".jpg";
|
||||||
|
child_position = position;
|
||||||
|
path = str + _pathforcheck;
|
||||||
|
|
||||||
|
startCameraActivity();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
if (mItem.getImage().equals("")) {
|
||||||
|
holder.img_cam.setBackgroundResource(R.mipmap.camera_orange);
|
||||||
|
} else {
|
||||||
|
holder.img_cam.setBackgroundResource(R.mipmap.camera_green);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
holder.img_cam.setBackgroundResource(R.mipmap.camera_grey);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
holder.toggle_btn.setChecked(mItem.isPresent());
|
||||||
|
|
||||||
|
if (mItem.getGapsChecklist().size() > 0) {
|
||||||
|
holder.btn_gaps.setBackgroundColor(getResources().getColor(R.color.green));
|
||||||
|
} else {
|
||||||
|
holder.btn_gaps.setBackgroundColor(getResources().getColor(R.color.colorPrimary));
|
||||||
|
}
|
||||||
|
|
||||||
|
if (mItem.getSkulist().size() > 0) {
|
||||||
|
holder.btn_sku.setBackgroundColor(getResources().getColor(R.color.green));
|
||||||
|
} else {
|
||||||
|
holder.btn_sku.setBackgroundColor(getResources().getColor(R.color.colorPrimary));
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int getItemCount() {
|
||||||
|
return list.size();
|
||||||
|
}
|
||||||
|
|
||||||
|
public class ViewHolder extends RecyclerView.ViewHolder {
|
||||||
|
public final View mView;
|
||||||
|
public final LinearLayout parentLayout;
|
||||||
|
public final TextView tv_brand, tv_display;
|
||||||
|
public final ImageView img_cam, img_remark;
|
||||||
|
public final Button btn_gaps, btn_sku, btn_ref_img;
|
||||||
|
public final ToggleButton toggle_btn;
|
||||||
|
|
||||||
|
|
||||||
|
public ViewHolder(View view) {
|
||||||
|
super(view);
|
||||||
|
|
||||||
|
mView = view;
|
||||||
|
|
||||||
|
tv_brand = (TextView) mView.findViewById(R.id.tv_brand);
|
||||||
|
tv_display = (TextView) mView.findViewById(R.id.tv_display);
|
||||||
|
img_cam = (ImageView) mView.findViewById(R.id.img_cam);
|
||||||
|
img_remark = (ImageView) mView.findViewById(R.id.img_remark);
|
||||||
|
btn_gaps = (Button) mView.findViewById(R.id.btn_gaps);
|
||||||
|
btn_sku = (Button) mView.findViewById(R.id.btn_sku);
|
||||||
|
btn_ref_img = (Button) mView.findViewById(R.id.btn_ref_image);
|
||||||
|
parentLayout = (LinearLayout) mView.findViewById(R.id.parent_layout);
|
||||||
|
toggle_btn = (ToggleButton) mView.findViewById(R.id.toggle_btn);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public class GapsAdapter extends RecyclerView.Adapter<GapsAdapter.ViewHolder> {
|
||||||
|
|
||||||
|
private ArrayList<GapsChecklistGetterSetter> list;
|
||||||
|
|
||||||
|
public GapsAdapter(ArrayList<GapsChecklistGetterSetter> gapsPList) {
|
||||||
|
list = gapsPList;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public ViewHolder onCreateViewHolder(ViewGroup parent, int viewType) {
|
||||||
|
View view = LayoutInflater.from(parent.getContext())
|
||||||
|
.inflate(R.layout.gap_checklist_item, parent, false);
|
||||||
|
return new ViewHolder(view);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onBindViewHolder(final ViewHolder holder, int position) {
|
||||||
|
|
||||||
|
final GapsChecklistGetterSetter mItem = list.get(position);
|
||||||
|
holder.tv_checklist.setText(mItem.getChecklist());
|
||||||
|
|
||||||
|
holder.tb_present.setOnClickListener(new View.OnClickListener() {
|
||||||
|
@Override
|
||||||
|
public void onClick(View v) {
|
||||||
|
|
||||||
|
mItem.setPresent(((ToggleButton) v).getText().toString().equalsIgnoreCase("Yes"));
|
||||||
|
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
holder.tb_present.setChecked(mItem.isPresent());
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int getItemCount() {
|
||||||
|
return list.size();
|
||||||
|
}
|
||||||
|
|
||||||
|
public class ViewHolder extends RecyclerView.ViewHolder {
|
||||||
|
public final View mView;
|
||||||
|
public final LinearLayout parentLayout;
|
||||||
|
public final TextView tv_checklist;
|
||||||
|
public final ToggleButton tb_present;
|
||||||
|
|
||||||
|
|
||||||
|
public ViewHolder(View view) {
|
||||||
|
super(view);
|
||||||
|
|
||||||
|
mView = view;
|
||||||
|
|
||||||
|
tv_checklist = (TextView) mView.findViewById(R.id.tv_checklist);
|
||||||
|
tb_present = (ToggleButton) mView.findViewById(R.id.btn_is_present);
|
||||||
|
parentLayout = (LinearLayout) mView.findViewById(R.id.parent_layout);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public class CustomAdapter extends ArrayAdapter<String> {
|
||||||
|
|
||||||
|
BrandMasterGetterSetter tempValues = null;
|
||||||
|
LayoutInflater inflater;
|
||||||
|
private Activity activity;
|
||||||
|
private ArrayList data;
|
||||||
|
|
||||||
|
/*************
|
||||||
|
* CustomAdapter Constructor
|
||||||
|
*****************/
|
||||||
|
public CustomAdapter(
|
||||||
|
T2PComplianceActivity activitySpinner,
|
||||||
|
int textViewResourceId,
|
||||||
|
ArrayList objects
|
||||||
|
|
||||||
|
) {
|
||||||
|
super(activitySpinner, textViewResourceId, objects);
|
||||||
|
|
||||||
|
/********** Take passed values **********/
|
||||||
|
activity = activitySpinner;
|
||||||
|
data = objects;
|
||||||
|
/*********** Layout inflator to call external xml layout () **********************/
|
||||||
|
inflater = (LayoutInflater) activity.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public View getDropDownView(int position, View convertView, ViewGroup parent) {
|
||||||
|
return getCustomView(position, convertView, parent);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public View getView(int position, View convertView, ViewGroup parent) {
|
||||||
|
return getCustomView(position, convertView, parent);
|
||||||
|
}
|
||||||
|
|
||||||
|
// This funtion called for each row ( Called data.size() times )
|
||||||
|
public View getCustomView(int position, View convertView, ViewGroup parent) {
|
||||||
|
|
||||||
|
/********** Inflate spinner_rows.xml file for each row ( Defined below ) ************/
|
||||||
|
View row = inflater.inflate(R.layout.custom_spinner_item, parent, false);
|
||||||
|
|
||||||
|
/***** Get each Model object from Arraylist ********/
|
||||||
|
tempValues = null;
|
||||||
|
tempValues = (BrandMasterGetterSetter) data.get(position);
|
||||||
|
|
||||||
|
TextView label = (TextView) row.findViewById(R.id.tv_text);
|
||||||
|
|
||||||
|
if (position == 0) {
|
||||||
|
|
||||||
|
// Default selected Spinner item
|
||||||
|
label.setText("Select");
|
||||||
|
//sub.setText("");
|
||||||
|
} else {
|
||||||
|
// Set values for spinner each row
|
||||||
|
label.setText(tempValues.getBRAND().get(0));
|
||||||
|
}
|
||||||
|
|
||||||
|
return row;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public class CustomSkuAdapter extends ArrayAdapter<String> {
|
||||||
|
|
||||||
|
SkuGetterSetter tempValues = null;
|
||||||
|
LayoutInflater inflater;
|
||||||
|
private Activity activity;
|
||||||
|
private ArrayList data;
|
||||||
|
|
||||||
|
/*************
|
||||||
|
* CustomAdapter Constructor
|
||||||
|
*****************/
|
||||||
|
public CustomSkuAdapter(
|
||||||
|
T2PComplianceActivity activitySpinner,
|
||||||
|
int textViewResourceId,
|
||||||
|
ArrayList objects
|
||||||
|
|
||||||
|
) {
|
||||||
|
super(activitySpinner, textViewResourceId, objects);
|
||||||
|
|
||||||
|
/********** Take passed values **********/
|
||||||
|
activity = activitySpinner;
|
||||||
|
data = objects;
|
||||||
|
/*********** Layout inflator to call external xml layout () **********************/
|
||||||
|
inflater = (LayoutInflater) activity.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public View getDropDownView(int position, View convertView, ViewGroup parent) {
|
||||||
|
return getCustomView(position, convertView, parent);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public View getView(int position, View convertView, ViewGroup parent) {
|
||||||
|
return getCustomView(position, convertView, parent);
|
||||||
|
}
|
||||||
|
|
||||||
|
// This funtion called for each row ( Called data.size() times )
|
||||||
|
public View getCustomView(int position, View convertView, ViewGroup parent) {
|
||||||
|
|
||||||
|
/********** Inflate spinner_rows.xml file for each row ( Defined below ) ************/
|
||||||
|
View row = inflater.inflate(R.layout.custom_spinner_item, parent, false);
|
||||||
|
|
||||||
|
/***** Get each Model object from Arraylist ********/
|
||||||
|
tempValues = null;
|
||||||
|
tempValues = (SkuGetterSetter) data.get(position);
|
||||||
|
|
||||||
|
TextView label = (TextView) row.findViewById(R.id.tv_text);
|
||||||
|
|
||||||
|
if (position == 0) {
|
||||||
|
|
||||||
|
// Default selected Spinner item
|
||||||
|
label.setText("Select");
|
||||||
|
//sub.setText("");
|
||||||
|
} else {
|
||||||
|
// Set values for spinner each row
|
||||||
|
label.setText(tempValues.getSKU());
|
||||||
|
}
|
||||||
|
|
||||||
|
return row;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public class SkuAddedAdapter extends RecyclerView.Adapter<SkuAddedAdapter.ViewHolder> {
|
public class SkuAddedAdapter extends RecyclerView.Adapter<SkuAddedAdapter.ViewHolder> {
|
||||||
|
|
||||||
private ArrayList<SkuGetterSetter> list;
|
private ArrayList<SkuGetterSetter> list;
|
||||||
@@ -843,50 +1021,4 @@ public class T2PComplianceActivity extends AppCompatActivity {
|
|||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean isValid() {
|
|
||||||
boolean flag = true;
|
|
||||||
|
|
||||||
for (int i = 0; i < t2PGetterSetters.size(); i++) {
|
|
||||||
|
|
||||||
if (camera_allow.equals("1") && t2PGetterSetters.get(i).getImage().equals("")) {
|
|
||||||
flag = false;
|
|
||||||
error_msg = getResources().getString(R.string.click_image);
|
|
||||||
break;
|
|
||||||
} else if (t2PGetterSetters.get(i).getGapsChecklist().size() == 0) {
|
|
||||||
flag = false;
|
|
||||||
error_msg = getResources().getString(R.string.fill_gaps_data);
|
|
||||||
break;
|
|
||||||
} else if (t2PGetterSetters.get(i).getSkulist().size() == 0) {
|
|
||||||
flag = false;
|
|
||||||
error_msg = getResources().getString(R.string.fill_sku_data);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return flag;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void onBackPressed() {
|
|
||||||
//super.onBackPressed();
|
|
||||||
|
|
||||||
android.app.AlertDialog.Builder builder = new android.app.AlertDialog.Builder(T2PComplianceActivity.this);
|
|
||||||
builder.setTitle("Parinaam");
|
|
||||||
builder.setMessage(getResources().getString(R.string.data_will_be_lost)).setCancelable(false)
|
|
||||||
.setPositiveButton("OK", new DialogInterface.OnClickListener() {
|
|
||||||
public void onClick(DialogInterface dialog, int id) {
|
|
||||||
|
|
||||||
finish();
|
|
||||||
}
|
|
||||||
})
|
|
||||||
.setNegativeButton("Cancel ", new DialogInterface.OnClickListener() {
|
|
||||||
@Override
|
|
||||||
public void onClick(DialogInterface dialog, int which) {
|
|
||||||
|
|
||||||
}
|
|
||||||
});
|
|
||||||
android.app.AlertDialog alert = builder.create();
|
|
||||||
alert.show();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -35,10 +35,12 @@ import cpm.com.gskmtorange.xmlGetterSetter.DisplayMasterGetterSetter;
|
|||||||
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;
|
||||||
|
import cpm.com.gskmtorange.xmlGetterSetter.MAPPING_PLANOGRAM_MasterGetterSetter;
|
||||||
import cpm.com.gskmtorange.xmlGetterSetter.MappingDisplayChecklistGetterSetter;
|
import cpm.com.gskmtorange.xmlGetterSetter.MappingDisplayChecklistGetterSetter;
|
||||||
import cpm.com.gskmtorange.xmlGetterSetter.MappingPromotionGetterSetter;
|
import cpm.com.gskmtorange.xmlGetterSetter.MappingPromotionGetterSetter;
|
||||||
import cpm.com.gskmtorange.xmlGetterSetter.MappingStockGetterSetter;
|
import cpm.com.gskmtorange.xmlGetterSetter.MappingStockGetterSetter;
|
||||||
import cpm.com.gskmtorange.xmlGetterSetter.NonWorkingReasonGetterSetter;
|
import cpm.com.gskmtorange.xmlGetterSetter.NonWorkingReasonGetterSetter;
|
||||||
|
import cpm.com.gskmtorange.xmlGetterSetter.STORE_PERFORMANCE_MasterGetterSetter;
|
||||||
import cpm.com.gskmtorange.xmlGetterSetter.SkuMasterGetterSetter;
|
import cpm.com.gskmtorange.xmlGetterSetter.SkuMasterGetterSetter;
|
||||||
import cpm.com.gskmtorange.xmlGetterSetter.SubCategoryMasterGetterSetter;
|
import cpm.com.gskmtorange.xmlGetterSetter.SubCategoryMasterGetterSetter;
|
||||||
import cpm.com.gskmtorange.xmlGetterSetter.TableBean;
|
import cpm.com.gskmtorange.xmlGetterSetter.TableBean;
|
||||||
@@ -46,15 +48,10 @@ import cpm.com.gskmtorange.xmlHandlers.XMLHandlers;
|
|||||||
|
|
||||||
public class DownloadActivity extends AppCompatActivity {
|
public class DownloadActivity extends AppCompatActivity {
|
||||||
|
|
||||||
private Dialog dialog;
|
|
||||||
private ProgressBar pb;
|
|
||||||
private TextView percentage, message;
|
|
||||||
Data data;
|
Data data;
|
||||||
int eventType;
|
int eventType;
|
||||||
GSKOrangeDB db;
|
GSKOrangeDB db;
|
||||||
private SharedPreferences preferences = null;
|
|
||||||
String userId, culture_id;
|
String userId, culture_id;
|
||||||
|
|
||||||
JourneyPlanGetterSetter jcpgettersetter;
|
JourneyPlanGetterSetter jcpgettersetter;
|
||||||
SkuMasterGetterSetter skumastergettersetter;
|
SkuMasterGetterSetter skumastergettersetter;
|
||||||
BrandMasterGetterSetter brandMasterGetterSetter;
|
BrandMasterGetterSetter brandMasterGetterSetter;
|
||||||
@@ -68,6 +65,12 @@ public class DownloadActivity extends AppCompatActivity {
|
|||||||
NonWorkingReasonGetterSetter nonWorkingReasonGetterSetter;
|
NonWorkingReasonGetterSetter nonWorkingReasonGetterSetter;
|
||||||
MappingPromotionGetterSetter mappingPromotionGetterSetter;
|
MappingPromotionGetterSetter mappingPromotionGetterSetter;
|
||||||
MAPPING_ADDITIONAL_PROMOTION_MasterGetterSetter mapping_additional_promotion_masterGetterSetter;
|
MAPPING_ADDITIONAL_PROMOTION_MasterGetterSetter mapping_additional_promotion_masterGetterSetter;
|
||||||
|
STORE_PERFORMANCE_MasterGetterSetter store_performance_masterGetterSetter;
|
||||||
|
MAPPING_PLANOGRAM_MasterGetterSetter mapping_planogram_masterGetterSetter;
|
||||||
|
private Dialog dialog;
|
||||||
|
private ProgressBar pb;
|
||||||
|
private TextView percentage, message;
|
||||||
|
private SharedPreferences preferences = null;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void onCreate(Bundle savedInstanceState) {
|
protected void onCreate(Bundle savedInstanceState) {
|
||||||
@@ -82,6 +85,24 @@ public class DownloadActivity extends AppCompatActivity {
|
|||||||
new UploadTask(DownloadActivity.this).execute();
|
new UploadTask(DownloadActivity.this).execute();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void showAlert(String str) {
|
||||||
|
|
||||||
|
AlertDialog.Builder builder = new AlertDialog.Builder(DownloadActivity.this);
|
||||||
|
builder.setTitle("Parinaam");
|
||||||
|
builder.setMessage(str).setCancelable(false)
|
||||||
|
.setPositiveButton("OK", new DialogInterface.OnClickListener() {
|
||||||
|
public void onClick(DialogInterface dialog, int id) {
|
||||||
|
|
||||||
|
/* Intent i = new Intent(activity, StorelistActivity.class);
|
||||||
|
activity.startActivity(i);
|
||||||
|
activity.finish();*/
|
||||||
|
|
||||||
|
}
|
||||||
|
});
|
||||||
|
AlertDialog alert = builder.create();
|
||||||
|
alert.show();
|
||||||
|
}
|
||||||
|
|
||||||
class Data {
|
class Data {
|
||||||
int value;
|
int value;
|
||||||
String name;
|
String name;
|
||||||
@@ -135,7 +156,7 @@ public class DownloadActivity extends AppCompatActivity {
|
|||||||
HttpTransportSE androidHttpTransport = new HttpTransportSE(CommonString.URL);
|
HttpTransportSE androidHttpTransport = new HttpTransportSE(CommonString.URL);
|
||||||
androidHttpTransport.call(CommonString.SOAP_ACTION_UNIVERSAL, envelope);
|
androidHttpTransport.call(CommonString.SOAP_ACTION_UNIVERSAL, envelope);
|
||||||
|
|
||||||
Object result = (Object) envelope.getResponse();
|
Object result = envelope.getResponse();
|
||||||
|
|
||||||
if (result.toString() != null) {
|
if (result.toString() != null) {
|
||||||
//InputStream stream = new ByteArrayInputStream(result.toString().getBytes("UTF-8"));
|
//InputStream stream = new ByteArrayInputStream(result.toString().getBytes("UTF-8"));
|
||||||
@@ -175,7 +196,7 @@ public class DownloadActivity extends AppCompatActivity {
|
|||||||
androidHttpTransport = new HttpTransportSE(CommonString.URL);
|
androidHttpTransport = new HttpTransportSE(CommonString.URL);
|
||||||
androidHttpTransport.call(CommonString.SOAP_ACTION_UNIVERSAL, envelope);
|
androidHttpTransport.call(CommonString.SOAP_ACTION_UNIVERSAL, envelope);
|
||||||
|
|
||||||
result = (Object) envelope.getResponse();
|
result = envelope.getResponse();
|
||||||
|
|
||||||
if (result.toString() != null) {
|
if (result.toString() != null) {
|
||||||
xpp.setInput(new StringReader(result.toString()));
|
xpp.setInput(new StringReader(result.toString()));
|
||||||
@@ -211,7 +232,7 @@ public class DownloadActivity extends AppCompatActivity {
|
|||||||
androidHttpTransport = new HttpTransportSE(CommonString.URL);
|
androidHttpTransport = new HttpTransportSE(CommonString.URL);
|
||||||
androidHttpTransport.call(CommonString.SOAP_ACTION_UNIVERSAL, envelope);
|
androidHttpTransport.call(CommonString.SOAP_ACTION_UNIVERSAL, envelope);
|
||||||
|
|
||||||
result = (Object) envelope.getResponse();
|
result = envelope.getResponse();
|
||||||
|
|
||||||
if (result.toString() != null) {
|
if (result.toString() != null) {
|
||||||
xpp.setInput(new StringReader(result.toString()));
|
xpp.setInput(new StringReader(result.toString()));
|
||||||
@@ -247,7 +268,7 @@ public class DownloadActivity extends AppCompatActivity {
|
|||||||
androidHttpTransport = new HttpTransportSE(CommonString.URL);
|
androidHttpTransport = new HttpTransportSE(CommonString.URL);
|
||||||
androidHttpTransport.call(CommonString.SOAP_ACTION_UNIVERSAL, envelope);
|
androidHttpTransport.call(CommonString.SOAP_ACTION_UNIVERSAL, envelope);
|
||||||
|
|
||||||
result = (Object) envelope.getResponse();
|
result = envelope.getResponse();
|
||||||
|
|
||||||
if (result.toString() != null) {
|
if (result.toString() != null) {
|
||||||
xpp.setInput(new StringReader(result.toString()));
|
xpp.setInput(new StringReader(result.toString()));
|
||||||
@@ -282,7 +303,7 @@ public class DownloadActivity extends AppCompatActivity {
|
|||||||
androidHttpTransport = new HttpTransportSE(CommonString.URL);
|
androidHttpTransport = new HttpTransportSE(CommonString.URL);
|
||||||
androidHttpTransport.call(CommonString.SOAP_ACTION_UNIVERSAL, envelope);
|
androidHttpTransport.call(CommonString.SOAP_ACTION_UNIVERSAL, envelope);
|
||||||
|
|
||||||
result = (Object) envelope.getResponse();
|
result = envelope.getResponse();
|
||||||
|
|
||||||
if (result.toString() != null) {
|
if (result.toString() != null) {
|
||||||
xpp.setInput(new StringReader(result.toString()));
|
xpp.setInput(new StringReader(result.toString()));
|
||||||
@@ -317,7 +338,7 @@ public class DownloadActivity extends AppCompatActivity {
|
|||||||
androidHttpTransport = new HttpTransportSE(CommonString.URL);
|
androidHttpTransport = new HttpTransportSE(CommonString.URL);
|
||||||
androidHttpTransport.call(CommonString.SOAP_ACTION_UNIVERSAL, envelope);
|
androidHttpTransport.call(CommonString.SOAP_ACTION_UNIVERSAL, envelope);
|
||||||
|
|
||||||
result = (Object) envelope.getResponse();
|
result = envelope.getResponse();
|
||||||
|
|
||||||
if (result.toString() != null) {
|
if (result.toString() != null) {
|
||||||
xpp.setInput(new StringReader(result.toString()));
|
xpp.setInput(new StringReader(result.toString()));
|
||||||
@@ -352,7 +373,7 @@ public class DownloadActivity extends AppCompatActivity {
|
|||||||
androidHttpTransport = new HttpTransportSE(CommonString.URL);
|
androidHttpTransport = new HttpTransportSE(CommonString.URL);
|
||||||
androidHttpTransport.call(CommonString.SOAP_ACTION_UNIVERSAL, envelope);
|
androidHttpTransport.call(CommonString.SOAP_ACTION_UNIVERSAL, envelope);
|
||||||
|
|
||||||
result = (Object) envelope.getResponse();
|
result = envelope.getResponse();
|
||||||
|
|
||||||
if (result.toString() != null) {
|
if (result.toString() != null) {
|
||||||
xpp.setInput(new StringReader(result.toString()));
|
xpp.setInput(new StringReader(result.toString()));
|
||||||
@@ -387,7 +408,7 @@ public class DownloadActivity extends AppCompatActivity {
|
|||||||
androidHttpTransport = new HttpTransportSE(CommonString.URL);
|
androidHttpTransport = new HttpTransportSE(CommonString.URL);
|
||||||
androidHttpTransport.call(CommonString.SOAP_ACTION_UNIVERSAL, envelope);
|
androidHttpTransport.call(CommonString.SOAP_ACTION_UNIVERSAL, envelope);
|
||||||
|
|
||||||
result = (Object) envelope.getResponse();
|
result = envelope.getResponse();
|
||||||
|
|
||||||
if (result.toString() != null) {
|
if (result.toString() != null) {
|
||||||
xpp.setInput(new StringReader(result.toString()));
|
xpp.setInput(new StringReader(result.toString()));
|
||||||
@@ -421,7 +442,7 @@ public class DownloadActivity extends AppCompatActivity {
|
|||||||
androidHttpTransport = new HttpTransportSE(CommonString.URL);
|
androidHttpTransport = new HttpTransportSE(CommonString.URL);
|
||||||
androidHttpTransport.call(CommonString.SOAP_ACTION_UNIVERSAL, envelope);
|
androidHttpTransport.call(CommonString.SOAP_ACTION_UNIVERSAL, envelope);
|
||||||
|
|
||||||
result = (Object) envelope.getResponse();
|
result = envelope.getResponse();
|
||||||
|
|
||||||
if (result.toString() != null) {
|
if (result.toString() != null) {
|
||||||
xpp.setInput(new StringReader(result.toString()));
|
xpp.setInput(new StringReader(result.toString()));
|
||||||
@@ -455,7 +476,7 @@ public class DownloadActivity extends AppCompatActivity {
|
|||||||
androidHttpTransport = new HttpTransportSE(CommonString.URL);
|
androidHttpTransport = new HttpTransportSE(CommonString.URL);
|
||||||
androidHttpTransport.call(CommonString.SOAP_ACTION_UNIVERSAL, envelope);
|
androidHttpTransport.call(CommonString.SOAP_ACTION_UNIVERSAL, envelope);
|
||||||
|
|
||||||
result = (Object) envelope.getResponse();
|
result = envelope.getResponse();
|
||||||
|
|
||||||
if (result.toString() != null) {
|
if (result.toString() != null) {
|
||||||
xpp.setInput(new StringReader(result.toString()));
|
xpp.setInput(new StringReader(result.toString()));
|
||||||
@@ -490,7 +511,7 @@ public class DownloadActivity extends AppCompatActivity {
|
|||||||
androidHttpTransport = new HttpTransportSE(CommonString.URL);
|
androidHttpTransport = new HttpTransportSE(CommonString.URL);
|
||||||
androidHttpTransport.call(CommonString.SOAP_ACTION_UNIVERSAL, envelope);
|
androidHttpTransport.call(CommonString.SOAP_ACTION_UNIVERSAL, envelope);
|
||||||
|
|
||||||
result = (Object) envelope.getResponse();
|
result = envelope.getResponse();
|
||||||
|
|
||||||
if (result.toString() != null) {
|
if (result.toString() != null) {
|
||||||
xpp.setInput(new StringReader(result.toString()));
|
xpp.setInput(new StringReader(result.toString()));
|
||||||
@@ -525,7 +546,7 @@ public class DownloadActivity extends AppCompatActivity {
|
|||||||
androidHttpTransport = new HttpTransportSE(CommonString.URL);
|
androidHttpTransport = new HttpTransportSE(CommonString.URL);
|
||||||
androidHttpTransport.call(CommonString.SOAP_ACTION_UNIVERSAL, envelope);
|
androidHttpTransport.call(CommonString.SOAP_ACTION_UNIVERSAL, envelope);
|
||||||
|
|
||||||
result = (Object) envelope.getResponse();
|
result = envelope.getResponse();
|
||||||
|
|
||||||
if (result.toString() != null) {
|
if (result.toString() != null) {
|
||||||
xpp.setInput(new StringReader(result.toString()));
|
xpp.setInput(new StringReader(result.toString()));
|
||||||
@@ -562,7 +583,7 @@ public class DownloadActivity extends AppCompatActivity {
|
|||||||
androidHttpTransport = new HttpTransportSE(CommonString.URL);
|
androidHttpTransport = new HttpTransportSE(CommonString.URL);
|
||||||
androidHttpTransport.call(CommonString.SOAP_ACTION_UNIVERSAL, envelope);
|
androidHttpTransport.call(CommonString.SOAP_ACTION_UNIVERSAL, envelope);
|
||||||
|
|
||||||
result = (Object) envelope.getResponse();
|
result = envelope.getResponse();
|
||||||
|
|
||||||
if (result.toString() != null) {
|
if (result.toString() != null) {
|
||||||
xpp.setInput(new StringReader(result.toString()));
|
xpp.setInput(new StringReader(result.toString()));
|
||||||
@@ -584,6 +605,79 @@ public class DownloadActivity extends AppCompatActivity {
|
|||||||
}
|
}
|
||||||
publishProgress(data);
|
publishProgress(data);
|
||||||
|
|
||||||
|
|
||||||
|
//STORE_PERFORMANCE
|
||||||
|
request = new SoapObject(CommonString.NAMESPACE, CommonString.METHOD_NAME_UNIVERSAL_DOWNLOAD);
|
||||||
|
request.addProperty("UserName", userId);
|
||||||
|
request.addProperty("Type", "STORE_PERFORMANCE");
|
||||||
|
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();
|
||||||
|
store_performance_masterGetterSetter = XMLHandlers.STORE_PERFORMANCEXMLHandler(xpp, eventType);
|
||||||
|
|
||||||
|
if (store_performance_masterGetterSetter.getSTORE_ID().size() > 0) {
|
||||||
|
String table_store_performace = store_performance_masterGetterSetter.getTable_STORE_PERFORMANCE();
|
||||||
|
if (table_store_performace != null) {
|
||||||
|
resultHttp = CommonString.KEY_SUCCESS;
|
||||||
|
TableBean.setStorePerformance(table_store_performace);
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
//return "STORE_PERFORMANCE";
|
||||||
|
}
|
||||||
|
data.value = 100;
|
||||||
|
data.name = "STORE_PERFORMANCE Data Download";
|
||||||
|
}
|
||||||
|
publishProgress(data);
|
||||||
|
|
||||||
|
|
||||||
|
//MAPPING_PLANOGRAM
|
||||||
|
request = new SoapObject(CommonString.NAMESPACE, CommonString.METHOD_NAME_UNIVERSAL_DOWNLOAD);
|
||||||
|
request.addProperty("UserName", userId);
|
||||||
|
request.addProperty("Type", "MAPPING_PLANOGRAM");
|
||||||
|
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();
|
||||||
|
mapping_planogram_masterGetterSetter = XMLHandlers.MAPPING_PLANOGRAM_XMLHandler(xpp, eventType);
|
||||||
|
|
||||||
|
if (mapping_planogram_masterGetterSetter.getKEYACCOUNT_ID().size() > 0) {
|
||||||
|
String table_mapping_planogram = mapping_planogram_masterGetterSetter.getTable_MAPPING_PLANOGRAM();
|
||||||
|
if (table_mapping_planogram != null) {
|
||||||
|
resultHttp = CommonString.KEY_SUCCESS;
|
||||||
|
TableBean.setMappingPlanogram(table_mapping_planogram);
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
//return "MAPPING_PLANOGRAM";
|
||||||
|
}
|
||||||
|
data.value = 100;
|
||||||
|
data.name = "MAPPING_PLANOGRAM Data Download";
|
||||||
|
}
|
||||||
|
publishProgress(data);
|
||||||
|
|
||||||
|
|
||||||
//Gagan end code
|
//Gagan end code
|
||||||
|
|
||||||
|
|
||||||
@@ -605,6 +699,9 @@ public class DownloadActivity extends AppCompatActivity {
|
|||||||
|
|
||||||
db.insertNonWorkingData(nonWorkingReasonGetterSetter);
|
db.insertNonWorkingData(nonWorkingReasonGetterSetter);
|
||||||
|
|
||||||
|
db.InsertSTORE_PERFORMANCE(store_performance_masterGetterSetter);
|
||||||
|
db.InsertMAPPING_PLANOGRAM(mapping_planogram_masterGetterSetter);
|
||||||
|
|
||||||
} catch (MalformedURLException e) {
|
} catch (MalformedURLException e) {
|
||||||
/*final AlertMessage message = new AlertMessage(
|
/*final AlertMessage message = new AlertMessage(
|
||||||
CompleteDownloadActivity.this,
|
CompleteDownloadActivity.this,
|
||||||
@@ -663,22 +760,4 @@ public class DownloadActivity extends AppCompatActivity {
|
|||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public void showAlert(String str) {
|
|
||||||
|
|
||||||
AlertDialog.Builder builder = new AlertDialog.Builder(DownloadActivity.this);
|
|
||||||
builder.setTitle("Parinaam");
|
|
||||||
builder.setMessage(str).setCancelable(false)
|
|
||||||
.setPositiveButton("OK", new DialogInterface.OnClickListener() {
|
|
||||||
public void onClick(DialogInterface dialog, int id) {
|
|
||||||
|
|
||||||
/* Intent i = new Intent(activity, StorelistActivity.class);
|
|
||||||
activity.startActivity(i);
|
|
||||||
activity.finish();*/
|
|
||||||
|
|
||||||
}
|
|
||||||
});
|
|
||||||
AlertDialog alert = builder.create();
|
|
||||||
alert.show();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -37,9 +37,8 @@ public class CategoryListActivity extends AppCompatActivity {
|
|||||||
CategoryListAdapter adapter;
|
CategoryListAdapter adapter;
|
||||||
|
|
||||||
GSKOrangeDB db;
|
GSKOrangeDB db;
|
||||||
|
|
||||||
private SharedPreferences preferences;
|
|
||||||
String store_id, visit_date, username, intime, date, keyAccount_id, class_id, storeType_id;
|
String store_id, visit_date, username, intime, date, keyAccount_id, class_id, storeType_id;
|
||||||
|
private SharedPreferences preferences;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void onCreate(Bundle savedInstanceState) {
|
protected void onCreate(Bundle savedInstanceState) {
|
||||||
@@ -93,10 +92,36 @@ public class CategoryListActivity extends AppCompatActivity {
|
|||||||
recyclerView.setLayoutManager(new GridLayoutManager(getApplicationContext(), 2));
|
recyclerView.setLayoutManager(new GridLayoutManager(getApplicationContext(), 2));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean onCreateOptionsMenu(Menu menu) {
|
||||||
|
// Inflate the menu; this adds items to the action bar if it is present.
|
||||||
|
getMenuInflater().inflate(R.menu.main, menu);
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean onOptionsItemSelected(MenuItem item) {
|
||||||
|
// Handle action bar item clicks here. The action bar will
|
||||||
|
// automatically handle clicks on the Home/Up button, so long
|
||||||
|
// as you specify a parent activity in AndroidManifest.xml.
|
||||||
|
int id = item.getItemId();
|
||||||
|
|
||||||
|
if (id == android.R.id.home) {
|
||||||
|
finish();
|
||||||
|
}
|
||||||
|
|
||||||
|
//noinspection SimplifiableIfStatement
|
||||||
|
if (id == R.id.action_settings) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
return super.onOptionsItemSelected(item);
|
||||||
|
}
|
||||||
|
|
||||||
public class CategoryListAdapter extends RecyclerView.Adapter<CategoryListAdapter.MyViewHolder> {
|
public class CategoryListAdapter extends RecyclerView.Adapter<CategoryListAdapter.MyViewHolder> {
|
||||||
private LayoutInflater inflator;
|
|
||||||
List<CategoryGetterSetter> list = Collections.emptyList();
|
List<CategoryGetterSetter> list = Collections.emptyList();
|
||||||
Context context;
|
Context context;
|
||||||
|
private LayoutInflater inflator;
|
||||||
|
|
||||||
public CategoryListAdapter(CategoryListActivity context, List<CategoryGetterSetter> list) {
|
public CategoryListAdapter(CategoryListActivity context, List<CategoryGetterSetter> list) {
|
||||||
inflator = LayoutInflater.from(context);
|
inflator = LayoutInflater.from(context);
|
||||||
@@ -123,19 +148,19 @@ public class CategoryListActivity extends AppCompatActivity {
|
|||||||
&& db.checkStockAndFacingData(store_id, categoryData.getCategory_id())
|
&& db.checkStockAndFacingData(store_id, categoryData.getCategory_id())
|
||||||
&& db.checkPromoComplianceData(store_id, categoryData.getCategory_id())) {
|
&& db.checkPromoComplianceData(store_id, categoryData.getCategory_id())) {
|
||||||
|
|
||||||
holder.categoryIcon.setImageResource(R.drawable.ohc_done);
|
holder.categoryIcon.setImageResource(R.mipmap.oralcare_tick);
|
||||||
} else {
|
} else {
|
||||||
holder.categoryIcon.setImageResource(R.drawable.ohc);
|
holder.categoryIcon.setImageResource(R.mipmap.oral_care);
|
||||||
}
|
}
|
||||||
} else if (categoryData.getCategory().equalsIgnoreCase("Wellness")) {
|
} else if (categoryData.getCategory().equalsIgnoreCase("Wellness")) {
|
||||||
if (db.checkMsl_AvailabilityData(store_id, categoryData.getCategory_id())
|
if (db.checkMsl_AvailabilityData(store_id, categoryData.getCategory_id())
|
||||||
&& db.checkStockAndFacingData(store_id, categoryData.getCategory_id())
|
&& db.checkStockAndFacingData(store_id, categoryData.getCategory_id())
|
||||||
&& db.checkPromoComplianceData(store_id, categoryData.getCategory_id())) {
|
&& db.checkPromoComplianceData(store_id, categoryData.getCategory_id())) {
|
||||||
|
|
||||||
holder.categoryIcon.setImageResource(R.drawable.pdr_done);
|
holder.categoryIcon.setImageResource(R.mipmap.wellness_tick);
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
holder.categoryIcon.setImageResource(R.drawable.pdr);
|
holder.categoryIcon.setImageResource(R.mipmap.wellness);
|
||||||
}
|
}
|
||||||
} else if (categoryData.getCategory().equalsIgnoreCase("Nutritionals")) {
|
} else if (categoryData.getCategory().equalsIgnoreCase("Nutritionals")) {
|
||||||
|
|
||||||
@@ -143,9 +168,9 @@ public class CategoryListActivity extends AppCompatActivity {
|
|||||||
&& db.checkStockAndFacingData(store_id, categoryData.getCategory_id())
|
&& db.checkStockAndFacingData(store_id, categoryData.getCategory_id())
|
||||||
&& db.checkPromoComplianceData(store_id, categoryData.getCategory_id())) {
|
&& db.checkPromoComplianceData(store_id, categoryData.getCategory_id())) {
|
||||||
|
|
||||||
holder.categoryIcon.setImageResource(R.drawable.hfd_done);
|
holder.categoryIcon.setImageResource(R.mipmap.nutritionals_tick);
|
||||||
} else {
|
} else {
|
||||||
holder.categoryIcon.setImageResource(R.drawable.hfd);
|
holder.categoryIcon.setImageResource(R.mipmap.nutritionals);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -179,30 +204,4 @@ public class CategoryListActivity extends AppCompatActivity {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public boolean onCreateOptionsMenu(Menu menu) {
|
|
||||||
// Inflate the menu; this adds items to the action bar if it is present.
|
|
||||||
getMenuInflater().inflate(R.menu.main, menu);
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public boolean onOptionsItemSelected(MenuItem item) {
|
|
||||||
// Handle action bar item clicks here. The action bar will
|
|
||||||
// automatically handle clicks on the Home/Up button, so long
|
|
||||||
// as you specify a parent activity in AndroidManifest.xml.
|
|
||||||
int id = item.getItemId();
|
|
||||||
|
|
||||||
if (id == android.R.id.home) {
|
|
||||||
finish();
|
|
||||||
}
|
|
||||||
|
|
||||||
//noinspection SimplifiableIfStatement
|
|
||||||
if (id == R.id.action_settings) {
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
return super.onOptionsItemSelected(item);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,7 +2,10 @@ package cpm.com.gskmtorange.gsk_dailyentry;
|
|||||||
|
|
||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
import android.content.Intent;
|
import android.content.Intent;
|
||||||
|
import android.content.SharedPreferences;
|
||||||
|
import android.content.res.Resources;
|
||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
|
import android.preference.PreferenceManager;
|
||||||
import android.support.design.widget.FloatingActionButton;
|
import android.support.design.widget.FloatingActionButton;
|
||||||
import android.support.v7.app.AppCompatActivity;
|
import android.support.v7.app.AppCompatActivity;
|
||||||
import android.support.v7.widget.LinearLayoutManager;
|
import android.support.v7.widget.LinearLayoutManager;
|
||||||
@@ -19,121 +22,84 @@ import java.util.ArrayList;
|
|||||||
import java.util.Collections;
|
import java.util.Collections;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
|
import cpm.com.gskmtorange.Database.GSKOrangeDB;
|
||||||
import cpm.com.gskmtorange.R;
|
import cpm.com.gskmtorange.R;
|
||||||
|
import cpm.com.gskmtorange.constant.CommonString;
|
||||||
import cpm.com.gskmtorange.xmlGetterSetter.CategoryWisePerformaceGetterSetter;
|
import cpm.com.gskmtorange.xmlGetterSetter.CategoryWisePerformaceGetterSetter;
|
||||||
|
|
||||||
public class CategoryWisePerformanceActivity extends AppCompatActivity {
|
public class CategoryWisePerformanceActivity extends AppCompatActivity {
|
||||||
TextView txt_categoryName;
|
|
||||||
RecyclerView recyclerView;
|
RecyclerView recyclerView;
|
||||||
|
Toolbar toolbar;
|
||||||
|
|
||||||
String categoryName = "", categoryId;
|
String categoryName = "", categoryId;
|
||||||
|
|
||||||
ArrayList<CategoryWisePerformaceGetterSetter> categoryWisePerformanceList;
|
ArrayList<CategoryWisePerformaceGetterSetter> categoryWisePerformanceList;
|
||||||
CategoryWisePerformaceAdapter adapter;
|
CategoryWisePerformaceAdapter adapter;
|
||||||
|
|
||||||
|
GSKOrangeDB db;
|
||||||
|
private SharedPreferences preferences;
|
||||||
|
String store_id, visit_date, username, intime, date, keyAccount_id, class_id, storeType_id;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void onCreate(Bundle savedInstanceState) {
|
protected void onCreate(Bundle savedInstanceState) {
|
||||||
super.onCreate(savedInstanceState);
|
super.onCreate(savedInstanceState);
|
||||||
setContentView(R.layout.activity_category_wise_performance);
|
try {
|
||||||
|
setContentView(R.layout.activity_category_wise_performance);
|
||||||
|
|
||||||
Toolbar toolbar = (Toolbar) findViewById(R.id.toolbar);
|
toolbar = (Toolbar) findViewById(R.id.toolbar);
|
||||||
|
recyclerView = (RecyclerView) findViewById(R.id.recyclerView);
|
||||||
|
|
||||||
recyclerView = (RecyclerView) findViewById(R.id.recyclerView);
|
db = new GSKOrangeDB(this);
|
||||||
//txt_categoryName = (TextView) findViewById(R.id.txt_categoryName);
|
db.open();
|
||||||
|
|
||||||
categoryName = getIntent().getStringExtra("categoryName");
|
//preference data
|
||||||
categoryId = getIntent().getStringExtra("categoryId");
|
preferences = PreferenceManager.getDefaultSharedPreferences(this);
|
||||||
|
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, "");
|
||||||
|
|
||||||
//txt_categoryName.setText(getResources().getString(R.string.title_activity_category_wise_performance) + " " + categoryName);
|
//Intent data
|
||||||
toolbar.setTitle(getResources().getString(R.string.title_activity_category_wise_performance) + " " + categoryName);
|
categoryName = getIntent().getStringExtra("categoryName");
|
||||||
setSupportActionBar(toolbar);
|
categoryId = getIntent().getStringExtra("categoryId");
|
||||||
getSupportActionBar().setHomeButtonEnabled(true);
|
|
||||||
getSupportActionBar().setDisplayHomeAsUpEnabled(true);
|
|
||||||
|
|
||||||
FloatingActionButton fab = (FloatingActionButton) findViewById(R.id.fab);
|
//txt_categoryName.setText(getResources().getString(R.string.title_activity_category_wise_performance) + " " + categoryName);
|
||||||
fab.setOnClickListener(new View.OnClickListener() {
|
toolbar.setTitle(getResources().getString(R.string.title_activity_category_wise_performance) + " " + categoryName);
|
||||||
@Override
|
setSupportActionBar(toolbar);
|
||||||
public void onClick(View view) {
|
getSupportActionBar().setHomeButtonEnabled(true);
|
||||||
Intent intent = new Intent(CategoryWisePerformanceActivity.this, DailyDataMenuActivity.class);
|
getSupportActionBar().setDisplayHomeAsUpEnabled(true);
|
||||||
intent.putExtra("categoryName", categoryName);
|
|
||||||
intent.putExtra("categoryId", categoryId);
|
FloatingActionButton fab = (FloatingActionButton) findViewById(R.id.fab);
|
||||||
startActivity(intent);
|
fab.setOnClickListener(new View.OnClickListener() {
|
||||||
}
|
@Override
|
||||||
});
|
public void onClick(View view) {
|
||||||
|
Intent intent = new Intent(CategoryWisePerformanceActivity.this, DailyDataMenuActivity.class);
|
||||||
|
intent.putExtra("categoryName", categoryName);
|
||||||
|
intent.putExtra("categoryId", categoryId);
|
||||||
|
startActivity(intent);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
} catch (Resources.NotFoundException e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void onResume() {
|
protected void onResume() {
|
||||||
super.onResume();
|
super.onResume();
|
||||||
|
try {
|
||||||
|
categoryWisePerformanceList = db.getCategoryWisePerformance(store_id, categoryId);
|
||||||
|
|
||||||
categoryWisePerformanceList = new ArrayList<>();
|
adapter = new CategoryWisePerformaceAdapter(CategoryWisePerformanceActivity.this, categoryWisePerformanceList);
|
||||||
CategoryWisePerformaceGetterSetter data = new CategoryWisePerformaceGetterSetter();
|
recyclerView.setAdapter(adapter);
|
||||||
|
recyclerView.setLayoutManager(new LinearLayoutManager(getApplicationContext()));
|
||||||
data.setPeriod("Period");
|
} catch (Exception e) {
|
||||||
data.setSos("SOS");
|
e.printStackTrace();
|
||||||
data.setT2p("T2P");
|
}
|
||||||
data.setPromo("Promo");
|
|
||||||
data.setMsl_availability("MSL Availability");
|
|
||||||
data.setOss("OSS");
|
|
||||||
categoryWisePerformanceList.add(data);
|
|
||||||
|
|
||||||
data = new CategoryWisePerformaceGetterSetter();
|
|
||||||
data.setPeriod("LTM");
|
|
||||||
data.setSos("75");
|
|
||||||
data.setT2p("0");
|
|
||||||
data.setPromo("0");
|
|
||||||
data.setMsl_availability("25");
|
|
||||||
data.setOss("55");
|
|
||||||
categoryWisePerformanceList.add(data);
|
|
||||||
|
|
||||||
data = new CategoryWisePerformaceGetterSetter();
|
|
||||||
data.setPeriod("MTM");
|
|
||||||
data.setSos("75");
|
|
||||||
data.setT2p("0");
|
|
||||||
data.setPromo("0");
|
|
||||||
data.setMsl_availability("25");
|
|
||||||
data.setOss("55");
|
|
||||||
categoryWisePerformanceList.add(data);
|
|
||||||
|
|
||||||
data = new CategoryWisePerformaceGetterSetter();
|
|
||||||
data.setPeriod("RTM");
|
|
||||||
data.setSos("75");
|
|
||||||
data.setT2p("0");
|
|
||||||
data.setPromo("0");
|
|
||||||
data.setMsl_availability("25");
|
|
||||||
data.setOss("55");
|
|
||||||
categoryWisePerformanceList.add(data);
|
|
||||||
|
|
||||||
data = new CategoryWisePerformaceGetterSetter();
|
|
||||||
data.setPeriod("LTM");
|
|
||||||
data.setSos("75");
|
|
||||||
data.setT2p("0");
|
|
||||||
data.setPromo("0");
|
|
||||||
data.setMsl_availability("25");
|
|
||||||
data.setOss("55");
|
|
||||||
categoryWisePerformanceList.add(data);
|
|
||||||
|
|
||||||
data = new CategoryWisePerformaceGetterSetter();
|
|
||||||
data.setPeriod("MTM");
|
|
||||||
data.setSos("75");
|
|
||||||
data.setT2p("0");
|
|
||||||
data.setPromo("0");
|
|
||||||
data.setMsl_availability("25");
|
|
||||||
data.setOss("55");
|
|
||||||
categoryWisePerformanceList.add(data);
|
|
||||||
|
|
||||||
data = new CategoryWisePerformaceGetterSetter();
|
|
||||||
data.setPeriod("RTM");
|
|
||||||
data.setSos("75");
|
|
||||||
data.setT2p("0");
|
|
||||||
data.setPromo("0");
|
|
||||||
data.setMsl_availability("25");
|
|
||||||
data.setOss("55");
|
|
||||||
categoryWisePerformanceList.add(data);
|
|
||||||
|
|
||||||
adapter = new CategoryWisePerformaceAdapter(CategoryWisePerformanceActivity.this, categoryWisePerformanceList);
|
|
||||||
recyclerView.setAdapter(adapter);
|
|
||||||
recyclerView.setLayoutManager(new LinearLayoutManager(getApplicationContext()));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public class CategoryWisePerformaceAdapter extends RecyclerView.Adapter<CategoryWisePerformaceAdapter.MyViewHolder> {
|
public class CategoryWisePerformaceAdapter extends RecyclerView.Adapter<CategoryWisePerformaceAdapter.MyViewHolder> {
|
||||||
@@ -158,11 +124,18 @@ public class CategoryWisePerformanceActivity extends AppCompatActivity {
|
|||||||
public void onBindViewHolder(CategoryWisePerformaceAdapter.MyViewHolder holder, int position) {
|
public void onBindViewHolder(CategoryWisePerformaceAdapter.MyViewHolder holder, int position) {
|
||||||
final CategoryWisePerformaceGetterSetter categoryData = list.get(position);
|
final CategoryWisePerformaceGetterSetter categoryData = list.get(position);
|
||||||
|
|
||||||
holder.txt_period.setText(categoryData.getPeriod());
|
if (categoryData.getPeriod().equalsIgnoreCase("LTM")) {
|
||||||
|
holder.txt_period.setText(getResources().getString(R.string.category_performance_ltm));
|
||||||
|
} else if (categoryData.getPeriod().equalsIgnoreCase("MTD")) {
|
||||||
|
holder.txt_period.setText(getResources().getString(R.string.category_performance_mtd));
|
||||||
|
} else if (categoryData.getPeriod().equalsIgnoreCase("LSV")) {
|
||||||
|
holder.txt_period.setText(getResources().getString(R.string.category_performance_lsv));
|
||||||
|
}
|
||||||
|
//holder.txt_period.setText(categoryData.getPeriod());
|
||||||
|
holder.txt_msl_availability.setText(categoryData.getMsl_availability());
|
||||||
holder.txt_sos.setText(categoryData.getSos());
|
holder.txt_sos.setText(categoryData.getSos());
|
||||||
holder.txt_t2p.setText(categoryData.getT2p());
|
holder.txt_t2p.setText(categoryData.getT2p());
|
||||||
holder.txt_promo.setText(categoryData.getPromo());
|
holder.txt_promo.setText(categoryData.getPromo());
|
||||||
holder.txt_msl_availability.setText(categoryData.getMsl_availability());
|
|
||||||
holder.txt_oss.setText(categoryData.getOss());
|
holder.txt_oss.setText(categoryData.getOss());
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -186,7 +159,6 @@ public class CategoryWisePerformanceActivity extends AppCompatActivity {
|
|||||||
txt_oss = (TextView) itemView.findViewById(R.id.txt_oss);
|
txt_oss = (TextView) itemView.findViewById(R.id.txt_oss);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
@@ -37,9 +37,8 @@ public class DailyDataMenuActivity extends AppCompatActivity {
|
|||||||
|
|
||||||
GSKOrangeDB db;
|
GSKOrangeDB db;
|
||||||
String categoryName = "", categoryId;
|
String categoryName = "", categoryId;
|
||||||
|
|
||||||
private SharedPreferences preferences;
|
|
||||||
String store_id, visit_date, username, intime, date, keyAccount_id, class_id, storeType_id;
|
String store_id, visit_date, username, intime, date, keyAccount_id, class_id, storeType_id;
|
||||||
|
private SharedPreferences preferences;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void onCreate(Bundle savedInstanceState) {
|
protected void onCreate(Bundle savedInstanceState) {
|
||||||
@@ -110,9 +109,9 @@ public class DailyDataMenuActivity extends AppCompatActivity {
|
|||||||
//data.setCategory_name("Stock & Facing");
|
//data.setCategory_name("Stock & Facing");
|
||||||
data.setCategory_name(getResources().getString(R.string.daily_data_menu_stock_facing));
|
data.setCategory_name(getResources().getString(R.string.daily_data_menu_stock_facing));
|
||||||
if (db.checkStockAndFacingData(store_id, categoryId)) {
|
if (db.checkStockAndFacingData(store_id, categoryId)) {
|
||||||
data.setCategory_img(R.mipmap.stock_and_facing_done);
|
data.setCategory_img(R.mipmap.stock_facing_done);
|
||||||
} else {
|
} else {
|
||||||
data.setCategory_img(R.mipmap.stock_and_facing);
|
data.setCategory_img(R.mipmap.stock_facing);
|
||||||
}
|
}
|
||||||
categoryList.add(data);
|
categoryList.add(data);
|
||||||
|
|
||||||
@@ -159,10 +158,36 @@ public class DailyDataMenuActivity extends AppCompatActivity {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean onCreateOptionsMenu(Menu menu) {
|
||||||
|
// Inflate the menu; this adds items to the action bar if it is present.
|
||||||
|
getMenuInflater().inflate(R.menu.main, menu);
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean onOptionsItemSelected(MenuItem item) {
|
||||||
|
// Handle action bar item clicks here. The action bar will
|
||||||
|
// automatically handle clicks on the Home/Up button, so long
|
||||||
|
// as you specify a parent activity in AndroidManifest.xml.
|
||||||
|
int id = item.getItemId();
|
||||||
|
|
||||||
|
if (id == android.R.id.home) {
|
||||||
|
finish();
|
||||||
|
}
|
||||||
|
|
||||||
|
//noinspection SimplifiableIfStatement
|
||||||
|
if (id == R.id.action_settings) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
return super.onOptionsItemSelected(item);
|
||||||
|
}
|
||||||
|
|
||||||
public class DailyDataMenuAdapter extends RecyclerView.Adapter<DailyDataMenuAdapter.MyViewHolder> {
|
public class DailyDataMenuAdapter extends RecyclerView.Adapter<DailyDataMenuAdapter.MyViewHolder> {
|
||||||
private LayoutInflater inflator;
|
|
||||||
List<DailyDataMenuGetterSetter> list = Collections.emptyList();
|
List<DailyDataMenuGetterSetter> list = Collections.emptyList();
|
||||||
Context context;
|
Context context;
|
||||||
|
private LayoutInflater inflator;
|
||||||
|
|
||||||
public DailyDataMenuAdapter(Context context, List<DailyDataMenuGetterSetter> list) {
|
public DailyDataMenuAdapter(Context context, List<DailyDataMenuGetterSetter> list) {
|
||||||
inflator = LayoutInflater.from(context);
|
inflator = LayoutInflater.from(context);
|
||||||
@@ -232,31 +257,5 @@ public class DailyDataMenuActivity extends AppCompatActivity {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public boolean onCreateOptionsMenu(Menu menu) {
|
|
||||||
// Inflate the menu; this adds items to the action bar if it is present.
|
|
||||||
getMenuInflater().inflate(R.menu.main, menu);
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public boolean onOptionsItemSelected(MenuItem item) {
|
|
||||||
// Handle action bar item clicks here. The action bar will
|
|
||||||
// automatically handle clicks on the Home/Up button, so long
|
|
||||||
// as you specify a parent activity in AndroidManifest.xml.
|
|
||||||
int id = item.getItemId();
|
|
||||||
|
|
||||||
if (id == android.R.id.home) {
|
|
||||||
finish();
|
|
||||||
}
|
|
||||||
|
|
||||||
//noinspection SimplifiableIfStatement
|
|
||||||
if (id == R.id.action_settings) {
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
return super.onOptionsItemSelected(item);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -54,9 +54,8 @@ public class MSL_AvailabilityActivity extends AppCompatActivity {
|
|||||||
GSKOrangeDB db;
|
GSKOrangeDB db;
|
||||||
|
|
||||||
String categoryName, categoryId, storeId;
|
String categoryName, categoryId, storeId;
|
||||||
|
|
||||||
private SharedPreferences preferences;
|
|
||||||
String store_id, visit_date, username, intime, date, keyAccount_id, class_id, storeType_id;
|
String store_id, visit_date, username, intime, date, keyAccount_id, class_id, storeType_id;
|
||||||
|
private SharedPreferences preferences;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void onCreate(Bundle savedInstanceState) {
|
protected void onCreate(Bundle savedInstanceState) {
|
||||||
@@ -248,6 +247,25 @@ public class MSL_AvailabilityActivity extends AppCompatActivity {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean onOptionsItemSelected(MenuItem item) {
|
||||||
|
// Handle action bar item clicks here. The action bar will
|
||||||
|
// automatically handle clicks on the Home/Up button, so long
|
||||||
|
// as you specify a parent activity in AndroidManifest.xml.
|
||||||
|
int id = item.getItemId();
|
||||||
|
|
||||||
|
if (id == android.R.id.home) {
|
||||||
|
finish();
|
||||||
|
}
|
||||||
|
|
||||||
|
//noinspection SimplifiableIfStatement
|
||||||
|
if (id == R.id.action_settings) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
return super.onOptionsItemSelected(item);
|
||||||
|
}
|
||||||
|
|
||||||
public class ExpandableListAdapter extends BaseExpandableListAdapter {
|
public class ExpandableListAdapter extends BaseExpandableListAdapter {
|
||||||
private Context _context;
|
private Context _context;
|
||||||
private List<MSL_AvailabilityGetterSetter> _listDataHeader;
|
private List<MSL_AvailabilityGetterSetter> _listDataHeader;
|
||||||
@@ -362,8 +380,8 @@ public class MSL_AvailabilityActivity extends AppCompatActivity {
|
|||||||
holder.txt_mbq = (TextView) convertView.findViewById(R.id.txt_mbq);
|
holder.txt_mbq = (TextView) convertView.findViewById(R.id.txt_mbq);
|
||||||
holder.toggle_available = (ToggleButton) convertView.findViewById(R.id.toggle_available);
|
holder.toggle_available = (ToggleButton) convertView.findViewById(R.id.toggle_available);
|
||||||
|
|
||||||
holder.toggle_available.setTextOff("No");
|
/*holder.toggle_available.setTextOff("No");
|
||||||
holder.toggle_available.setTextOn("Yes");
|
holder.toggle_available.setTextOn("Yes");*/
|
||||||
|
|
||||||
convertView.setTag(holder);
|
convertView.setTag(holder);
|
||||||
} else {
|
} else {
|
||||||
@@ -418,23 +436,4 @@ public class MSL_AvailabilityActivity extends AppCompatActivity {
|
|||||||
ToggleButton toggle_available;
|
ToggleButton toggle_available;
|
||||||
LinearLayout lin_category;
|
LinearLayout lin_category;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public boolean onOptionsItemSelected(MenuItem item) {
|
|
||||||
// Handle action bar item clicks here. The action bar will
|
|
||||||
// automatically handle clicks on the Home/Up button, so long
|
|
||||||
// as you specify a parent activity in AndroidManifest.xml.
|
|
||||||
int id = item.getItemId();
|
|
||||||
|
|
||||||
if (id == android.R.id.home) {
|
|
||||||
finish();
|
|
||||||
}
|
|
||||||
|
|
||||||
//noinspection SimplifiableIfStatement
|
|
||||||
if (id == R.id.action_settings) {
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
return super.onOptionsItemSelected(item);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
package cpm.com.gskmtorange.gsk_dailyentry;
|
package cpm.com.gskmtorange.gsk_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.Intent;
|
import android.content.Intent;
|
||||||
@@ -8,7 +9,11 @@ import android.content.SharedPreferences;
|
|||||||
import android.content.pm.ApplicationInfo;
|
import android.content.pm.ApplicationInfo;
|
||||||
import android.content.pm.PackageManager;
|
import android.content.pm.PackageManager;
|
||||||
import android.content.res.Resources;
|
import android.content.res.Resources;
|
||||||
|
import android.graphics.Bitmap;
|
||||||
|
import android.graphics.BitmapFactory;
|
||||||
|
import android.graphics.Color;
|
||||||
import android.graphics.Typeface;
|
import android.graphics.Typeface;
|
||||||
|
import android.graphics.drawable.ColorDrawable;
|
||||||
import android.net.Uri;
|
import android.net.Uri;
|
||||||
import android.os.Build;
|
import android.os.Build;
|
||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
@@ -22,12 +27,16 @@ import android.support.v7.widget.CardView;
|
|||||||
import android.support.v7.widget.Toolbar;
|
import android.support.v7.widget.Toolbar;
|
||||||
import android.util.Log;
|
import android.util.Log;
|
||||||
import android.view.LayoutInflater;
|
import android.view.LayoutInflater;
|
||||||
|
import android.view.Menu;
|
||||||
import android.view.MenuItem;
|
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.widget.AbsListView;
|
import android.widget.AbsListView;
|
||||||
import android.widget.BaseExpandableListAdapter;
|
import android.widget.BaseExpandableListAdapter;
|
||||||
|
import android.widget.Button;
|
||||||
import android.widget.EditText;
|
import android.widget.EditText;
|
||||||
import android.widget.ExpandableListView;
|
import android.widget.ExpandableListView;
|
||||||
import android.widget.ImageView;
|
import android.widget.ImageView;
|
||||||
@@ -48,31 +57,27 @@ import java.util.List;
|
|||||||
import cpm.com.gskmtorange.Database.GSKOrangeDB;
|
import cpm.com.gskmtorange.Database.GSKOrangeDB;
|
||||||
import cpm.com.gskmtorange.R;
|
import cpm.com.gskmtorange.R;
|
||||||
import cpm.com.gskmtorange.constant.CommonString;
|
import cpm.com.gskmtorange.constant.CommonString;
|
||||||
|
import cpm.com.gskmtorange.dailyentry.T2PComplianceActivity;
|
||||||
import cpm.com.gskmtorange.xmlGetterSetter.MSL_AvailabilityGetterSetter;
|
import cpm.com.gskmtorange.xmlGetterSetter.MSL_AvailabilityGetterSetter;
|
||||||
import cpm.com.gskmtorange.xmlGetterSetter.Stock_FacingGetterSetter;
|
import cpm.com.gskmtorange.xmlGetterSetter.Stock_FacingGetterSetter;
|
||||||
|
|
||||||
public class Stock_FacingActivity extends AppCompatActivity {
|
public class Stock_FacingActivity extends AppCompatActivity {
|
||||||
|
static int child_position = -1;
|
||||||
ExpandableListView expandableListView;
|
ExpandableListView expandableListView;
|
||||||
TextView txt_stockFacingName;
|
TextView txt_stockFacingName;
|
||||||
|
|
||||||
ArrayList<Stock_FacingGetterSetter> headerDataList;
|
ArrayList<Stock_FacingGetterSetter> headerDataList;
|
||||||
ArrayList<Stock_FacingGetterSetter> childDataList;
|
ArrayList<Stock_FacingGetterSetter> childDataList;
|
||||||
List<Stock_FacingGetterSetter> hashMapListHeaderData;
|
List<Stock_FacingGetterSetter> hashMapListHeaderData;
|
||||||
HashMap<Stock_FacingGetterSetter, List<Stock_FacingGetterSetter>> hashMapListChildData;
|
HashMap<Stock_FacingGetterSetter, List<Stock_FacingGetterSetter>> hashMapListChildData;
|
||||||
List<Integer> checkHeaderArray = new ArrayList<>();
|
List<Integer> checkHeaderArray = new ArrayList<>();
|
||||||
|
|
||||||
ExpandableListAdapter adapter;
|
ExpandableListAdapter adapter;
|
||||||
GSKOrangeDB db;
|
GSKOrangeDB db;
|
||||||
|
|
||||||
String categoryName, categoryId, Error_Message = "";
|
String categoryName, categoryId, Error_Message = "";
|
||||||
|
|
||||||
String path = "", str = "", _pathforcheck = "", img1 = "", img2 = "";
|
String path = "", str = "", _pathforcheck = "", img1 = "", img2 = "";
|
||||||
static int child_position = -1;
|
|
||||||
boolean isDialogOpen = true;
|
boolean isDialogOpen = true;
|
||||||
boolean checkflag = true;
|
boolean checkflag = true;
|
||||||
|
String store_id, visit_date, username, intime, date, keyAccount_id, class_id, storeType_id, camera_allow;
|
||||||
private SharedPreferences preferences;
|
private SharedPreferences preferences;
|
||||||
String store_id, visit_date, username, intime, date, keyAccount_id, class_id, storeType_id;
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void onCreate(Bundle savedInstanceState) {
|
protected void onCreate(Bundle savedInstanceState) {
|
||||||
@@ -98,6 +103,7 @@ public class Stock_FacingActivity extends AppCompatActivity {
|
|||||||
keyAccount_id = preferences.getString(CommonString.KEY_KEYACCOUNT_ID, "");
|
keyAccount_id = preferences.getString(CommonString.KEY_KEYACCOUNT_ID, "");
|
||||||
class_id = preferences.getString(CommonString.KEY_CLASS_ID, "");
|
class_id = preferences.getString(CommonString.KEY_CLASS_ID, "");
|
||||||
storeType_id = preferences.getString(CommonString.KEY_STORETYPE_ID, "");
|
storeType_id = preferences.getString(CommonString.KEY_STORETYPE_ID, "");
|
||||||
|
camera_allow = preferences.getString(CommonString.KEY_CAMERA_ALLOW, "");
|
||||||
|
|
||||||
categoryName = getIntent().getStringExtra("categoryName");
|
categoryName = getIntent().getStringExtra("categoryName");
|
||||||
categoryId = getIntent().getStringExtra("categoryId");
|
categoryId = getIntent().getStringExtra("categoryId");
|
||||||
@@ -269,6 +275,305 @@ public class Stock_FacingActivity extends AppCompatActivity {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
boolean validateData(List<Stock_FacingGetterSetter> listDataHeader,
|
||||||
|
HashMap<Stock_FacingGetterSetter, List<Stock_FacingGetterSetter>> listDataChild) {
|
||||||
|
boolean flag = true;
|
||||||
|
checkHeaderArray.clear();
|
||||||
|
|
||||||
|
for (int i = 0; i < listDataHeader.size(); i++) {
|
||||||
|
String imagePath = listDataHeader.get(i).getImage1();
|
||||||
|
String imagePath1 = listDataHeader.get(i).getImage2();
|
||||||
|
|
||||||
|
for (int j = 0; j < listDataChild.get(listDataHeader.get(i)).size(); j++) {
|
||||||
|
String stock = listDataChild.get(listDataHeader.get(i)).get(j).getStock();
|
||||||
|
String faceup = listDataChild.get(listDataHeader.get(i)).get(j).getFacing();
|
||||||
|
|
||||||
|
//Camera allow enable
|
||||||
|
if (camera_allow.equalsIgnoreCase("1")) {
|
||||||
|
|
||||||
|
if (!imagePath.equals("") || !imagePath1.equals("")) {
|
||||||
|
if (!stock.equals("0")) {
|
||||||
|
if (stock.equals("") || faceup.equals("")) {
|
||||||
|
if (!checkHeaderArray.contains(i)) {
|
||||||
|
checkHeaderArray.add(i);
|
||||||
|
}
|
||||||
|
|
||||||
|
flag = false;
|
||||||
|
Error_Message = "Please fill all the data";
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
if (stock.equals("")) {
|
||||||
|
if (!checkHeaderArray.contains(i)) {
|
||||||
|
checkHeaderArray.add(i);
|
||||||
|
}
|
||||||
|
|
||||||
|
flag = false;
|
||||||
|
Error_Message = "Please fill all the data";
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
if (!checkHeaderArray.contains(i)) {
|
||||||
|
checkHeaderArray.add(i);
|
||||||
|
}
|
||||||
|
|
||||||
|
flag = false;
|
||||||
|
Error_Message = "Please click either 1 image";
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
} else {
|
||||||
|
//Camera allow disable
|
||||||
|
if (!stock.equals("0")) {
|
||||||
|
if (stock.equals("") || faceup.equals("")) {
|
||||||
|
if (!checkHeaderArray.contains(i)) {
|
||||||
|
checkHeaderArray.add(i);
|
||||||
|
}
|
||||||
|
|
||||||
|
flag = false;
|
||||||
|
Error_Message = "Please fill all the data";
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
if (stock.equals("")) {
|
||||||
|
if (!checkHeaderArray.contains(i)) {
|
||||||
|
checkHeaderArray.add(i);
|
||||||
|
}
|
||||||
|
|
||||||
|
flag = false;
|
||||||
|
Error_Message = "Please fill all the data";
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (flag == false) {
|
||||||
|
checkflag = false;
|
||||||
|
break;
|
||||||
|
} else {
|
||||||
|
checkflag = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
//expListView.invalidate();
|
||||||
|
adapter.notifyDataSetChanged();
|
||||||
|
|
||||||
|
return checkflag;
|
||||||
|
}
|
||||||
|
|
||||||
|
private void startCameraActivity1(int position) {
|
||||||
|
try {
|
||||||
|
/*Log.e("Stock and Facing ", "startCameraActivity()");
|
||||||
|
File file = new File(path);
|
||||||
|
Uri outputFileUri = Uri.fromFile(file);
|
||||||
|
|
||||||
|
Intent intent = new Intent(android.provider.MediaStore.ACTION_IMAGE_CAPTURE);
|
||||||
|
intent.putExtra(MediaStore.EXTRA_OUTPUT, outputFileUri);
|
||||||
|
startActivityForResult(intent, position);*/
|
||||||
|
|
||||||
|
Log.i("Stock & Facing ", "startCameraActivity()");
|
||||||
|
File file = new File(path);
|
||||||
|
Uri outputFileUri = Uri.fromFile(file);
|
||||||
|
|
||||||
|
String defaultCameraPackage = "";
|
||||||
|
final PackageManager packageManager = 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);*/
|
||||||
|
|
||||||
|
if (android.os.Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT) {
|
||||||
|
if (list.get(n).loadLabel(packageManager).toString().equalsIgnoreCase("Camera")) {
|
||||||
|
defaultCameraPackage = list.get(n).packageName;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
if (list.get(n).loadLabel(packageManager).toString().equalsIgnoreCase("Gallery")) {
|
||||||
|
defaultCameraPackage = list.get(n).packageName;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
Intent intent = new Intent(android.provider.MediaStore.ACTION_IMAGE_CAPTURE);
|
||||||
|
intent.putExtra(MediaStore.EXTRA_OUTPUT, outputFileUri);
|
||||||
|
intent.setPackage(defaultCameraPackage);
|
||||||
|
startActivityForResult(intent, 1);
|
||||||
|
//startActivityForResult(intent, position);
|
||||||
|
|
||||||
|
} catch (Exception e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private void startCameraActivity2(int position) {
|
||||||
|
try {
|
||||||
|
/*Log.e("Stock and Facing ", "startCameraActivity()");
|
||||||
|
File file = new File(path);
|
||||||
|
Uri outputFileUri = Uri.fromFile(file);
|
||||||
|
|
||||||
|
Intent intent = new Intent(android.provider.MediaStore.ACTION_IMAGE_CAPTURE);
|
||||||
|
intent.putExtra(MediaStore.EXTRA_OUTPUT, outputFileUri);
|
||||||
|
startActivityForResult(intent, position);*/
|
||||||
|
|
||||||
|
Log.i("Stock & Facing ", "startCameraActivity()");
|
||||||
|
File file = new File(path);
|
||||||
|
Uri outputFileUri = Uri.fromFile(file);
|
||||||
|
|
||||||
|
String defaultCameraPackage = "";
|
||||||
|
final PackageManager packageManager = 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);*/
|
||||||
|
|
||||||
|
if (android.os.Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT) {
|
||||||
|
if (list.get(n).loadLabel(packageManager).toString().equalsIgnoreCase("Camera")) {
|
||||||
|
defaultCameraPackage = list.get(n).packageName;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
if (list.get(n).loadLabel(packageManager).toString().equalsIgnoreCase("Gallery")) {
|
||||||
|
defaultCameraPackage = list.get(n).packageName;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
Intent intent = new Intent(android.provider.MediaStore.ACTION_IMAGE_CAPTURE);
|
||||||
|
intent.putExtra(MediaStore.EXTRA_OUTPUT, outputFileUri);
|
||||||
|
intent.setPackage(defaultCameraPackage);
|
||||||
|
startActivityForResult(intent, 2);
|
||||||
|
//startActivityForResult(intent, position);
|
||||||
|
} catch (Exception e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected void onActivityResult(int requestCode, int resultCode, Intent data) {
|
||||||
|
Log.e("Stock & Facing", "resultCode: " + resultCode);
|
||||||
|
/*switch (resultCode) {
|
||||||
|
case 0:
|
||||||
|
Log.e("Stock & Facing", "User cancelled");
|
||||||
|
break;
|
||||||
|
case -1:
|
||||||
|
if (_pathforcheck != null && !_pathforcheck.equals("")) {
|
||||||
|
if (new File(str + _pathforcheck).exists()) {
|
||||||
|
img1 = _pathforcheck;
|
||||||
|
adapter.notifyDataSetChanged();
|
||||||
|
_pathforcheck = "";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}*/
|
||||||
|
|
||||||
|
switch (requestCode) {
|
||||||
|
case 1:
|
||||||
|
if (resultCode == -1) {
|
||||||
|
if (_pathforcheck != null && !_pathforcheck.equals("")) {
|
||||||
|
if (new File(str + _pathforcheck).exists()) {
|
||||||
|
img1 = _pathforcheck;
|
||||||
|
adapter.notifyDataSetChanged();
|
||||||
|
_pathforcheck = "";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
Log.e("Stock & Facing", "User cancelled");
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case 2:
|
||||||
|
if (resultCode == -1) {
|
||||||
|
if (_pathforcheck != null && !_pathforcheck.equals("")) {
|
||||||
|
if (new File(str + _pathforcheck).exists()) {
|
||||||
|
img2 = _pathforcheck;
|
||||||
|
adapter.notifyDataSetChanged();
|
||||||
|
_pathforcheck = "";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
Log.e("Stock & Facing", "User cancelled");
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
super.onActivityResult(requestCode, resultCode, data);
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getCurrentTime() {
|
||||||
|
Calendar m_cal = Calendar.getInstance();
|
||||||
|
SimpleDateFormat formatter = new SimpleDateFormat("HH:mm:ss");
|
||||||
|
String cdate = formatter.format(m_cal.getTime());
|
||||||
|
/* String intime = m_cal.get(Calendar.HOUR_OF_DAY) + ":"
|
||||||
|
+ m_cal.get(Calendar.MINUTE) + ":" + m_cal.get(Calendar.SECOND);*/
|
||||||
|
|
||||||
|
return cdate;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean onCreateOptionsMenu(Menu menu) {
|
||||||
|
getMenuInflater().inflate(R.menu.planogram, menu);
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean onOptionsItemSelected(MenuItem item) {
|
||||||
|
// Handle action bar item clicks here. The action bar will
|
||||||
|
// automatically handle clicks on the Home/Up button, so long
|
||||||
|
// as you specify a parent activity in AndroidManifest.xml.
|
||||||
|
int id = item.getItemId();
|
||||||
|
|
||||||
|
if (id == android.R.id.home) {
|
||||||
|
finish();
|
||||||
|
}
|
||||||
|
|
||||||
|
//Planogram Dialog
|
||||||
|
if (id == R.id.action_planogram) {
|
||||||
|
//final Dialog dialog = new Dialog(Stock_FacingActivity.this, android.R.style.Theme_Black_NoTitleBar_Fullscreen);
|
||||||
|
final Dialog dialog = new Dialog(Stock_FacingActivity.this);
|
||||||
|
dialog.requestWindowFeature(Window.FEATURE_NO_TITLE);
|
||||||
|
//dialog.getWindow().setBackgroundDrawable(new ColorDrawable(Color.TRANSPARENT));
|
||||||
|
dialog.setContentView(R.layout.planogram_dialog_layout);
|
||||||
|
dialog.getWindow().setLayout(WindowManager.LayoutParams.MATCH_PARENT, WindowManager.LayoutParams.MATCH_PARENT);
|
||||||
|
|
||||||
|
ImageView img_planogram = (ImageView) dialog.findViewById(R.id.img_planogram);
|
||||||
|
|
||||||
|
String planogram_image = "";
|
||||||
|
if (new File(str + planogram_image).exists()) {
|
||||||
|
Bitmap bmp = BitmapFactory.decodeFile(str + planogram_image);
|
||||||
|
img_planogram.setImageBitmap(bmp);
|
||||||
|
} else {
|
||||||
|
img_planogram.setBackgroundResource(R.drawable.sad_cloud);
|
||||||
|
}
|
||||||
|
|
||||||
|
/*if (new File(str + "Stock_Cam1_3_9_01122017_162052.jpg").exists()) {
|
||||||
|
Bitmap bmp = BitmapFactory.decodeFile(str + "Stock_Cam1_3_9_01122017_162052.jpg");
|
||||||
|
img_planogram.setImageBitmap(bmp);
|
||||||
|
} else {
|
||||||
|
img_planogram.setBackgroundResource(R.drawable.sad_cloud);
|
||||||
|
}*/
|
||||||
|
|
||||||
|
|
||||||
|
ImageView cancel = (ImageView) dialog.findViewById(R.id.img_cancel);
|
||||||
|
cancel.setOnClickListener(new View.OnClickListener() {
|
||||||
|
@Override
|
||||||
|
public void onClick(View v) {
|
||||||
|
dialog.dismiss();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
dialog.show();
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
return super.onOptionsItemSelected(item);
|
||||||
|
}
|
||||||
|
|
||||||
public class ExpandableListAdapter extends BaseExpandableListAdapter {
|
public class ExpandableListAdapter extends BaseExpandableListAdapter {
|
||||||
private Context _context;
|
private Context _context;
|
||||||
private List<Stock_FacingGetterSetter> _listDataHeader;
|
private List<Stock_FacingGetterSetter> _listDataHeader;
|
||||||
@@ -306,71 +611,85 @@ public class Stock_FacingActivity extends AppCompatActivity {
|
|||||||
}
|
}
|
||||||
|
|
||||||
TextView txt_stockFaceupHeader = (TextView) convertView.findViewById(R.id.txt_stockFaceupHeader);
|
TextView txt_stockFaceupHeader = (TextView) convertView.findViewById(R.id.txt_stockFaceupHeader);
|
||||||
|
TextView txt_sosHeader = (TextView) convertView.findViewById(R.id.txt_sosHeader);
|
||||||
LinearLayout lin_stockFaceupHeader = (LinearLayout) convertView.findViewById(R.id.lin_stockFaceupHeader);
|
LinearLayout lin_stockFaceupHeader = (LinearLayout) convertView.findViewById(R.id.lin_stockFaceupHeader);
|
||||||
ImageView img_reference = (ImageView) convertView.findViewById(R.id.img_reference);
|
|
||||||
ImageView img_camera1 = (ImageView) convertView.findViewById(R.id.img_camera1);
|
ImageView img_camera1 = (ImageView) convertView.findViewById(R.id.img_camera1);
|
||||||
ImageView img_camera2 = (ImageView) convertView.findViewById(R.id.img_camera2);
|
ImageView img_camera2 = (ImageView) convertView.findViewById(R.id.img_camera2);
|
||||||
ImageView img_edit = (ImageView) convertView.findViewById(R.id.img_edit);
|
//ImageView img_reference = (ImageView) convertView.findViewById(R.id.img_reference);
|
||||||
|
//ImageView img_edit = (ImageView) convertView.findViewById(R.id.img_edit);
|
||||||
|
|
||||||
txt_stockFaceupHeader.setTypeface(null, Typeface.BOLD);
|
txt_stockFaceupHeader.setTypeface(null, Typeface.BOLD);
|
||||||
txt_stockFaceupHeader.setText(headerTitle.getSub_category() + "-" + headerTitle.getBrand());
|
txt_stockFaceupHeader.setText(headerTitle.getSub_category() + "-" + headerTitle.getBrand());
|
||||||
|
|
||||||
img_camera1.setOnClickListener(new View.OnClickListener() {
|
if (headerTitle.getCompany_id().equals("1")) {
|
||||||
@Override
|
txt_stockFaceupHeader.setTextColor(getResources().getColor(R.color.colorPrimaryDark));
|
||||||
public void onClick(View v) {
|
|
||||||
//String date = new Date().toLocaleString().toString();
|
|
||||||
//String tempDate = new Date().toLocaleString().toString().replace(' ', '_').replace(',', '_').replace(':', '-');
|
|
||||||
|
|
||||||
_pathforcheck = "Stock_Cam1_" + store_id + "_" + headerTitle.getBrand_id() + "_" + visit_date.replace("/", "") + "_" + getCurrentTime().replace(":", "") + ".jpg";
|
|
||||||
child_position = groupPosition;
|
|
||||||
path = str + _pathforcheck;
|
|
||||||
|
|
||||||
startCameraActivity1(groupPosition);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
if (!img1.equalsIgnoreCase("")) {
|
|
||||||
if (groupPosition == child_position) {
|
|
||||||
headerTitle.setImage1(img1);
|
|
||||||
img1 = "";
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (headerTitle.getImage1().equals("")) {
|
|
||||||
img_camera1.setBackgroundResource(R.mipmap.camera);
|
|
||||||
} else {
|
} else {
|
||||||
img_camera1.setBackgroundResource(R.mipmap.camera_done);
|
txt_stockFaceupHeader.setTextColor(getResources().getColor(R.color.black));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//Camera allow enable
|
||||||
|
if (camera_allow.equalsIgnoreCase("1")) {
|
||||||
|
|
||||||
img_camera2.setOnClickListener(new View.OnClickListener() {
|
img_camera1.setOnClickListener(new View.OnClickListener() {
|
||||||
@Override
|
@Override
|
||||||
public void onClick(View v) {
|
public void onClick(View v) {
|
||||||
//String date = new Date().toLocaleString().toString();
|
//String date = new Date().toLocaleString().toString();
|
||||||
//String tempDate = new Date().toLocaleString().toString().replace(' ', '_').replace(',', '_').replace(':', '-');
|
//String tempDate = new Date().toLocaleString().toString().replace(' ', '_').replace(',', '_').replace(':', '-');
|
||||||
|
|
||||||
_pathforcheck = "Stock_Cam2_" + store_id + "_" + headerTitle.getBrand_id() + "_" + visit_date.replace("/", "") + "_" + getCurrentTime().replace(":", "") + ".jpg";
|
_pathforcheck = "Stock_Cam1_" + store_id + "_" + headerTitle.getBrand_id() + "_" + visit_date.replace("/", "") + "_" + getCurrentTime().replace(":", "") + ".jpg";
|
||||||
child_position = groupPosition;
|
child_position = groupPosition;
|
||||||
path = str + _pathforcheck;
|
path = str + _pathforcheck;
|
||||||
|
|
||||||
startCameraActivity2(groupPosition);
|
startCameraActivity1(groupPosition);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
if (!img1.equalsIgnoreCase("")) {
|
||||||
|
if (groupPosition == child_position) {
|
||||||
|
headerTitle.setImage1(img1);
|
||||||
|
img1 = "";
|
||||||
|
}
|
||||||
}
|
}
|
||||||
});
|
|
||||||
|
|
||||||
if (!img2.equalsIgnoreCase("")) {
|
if (headerTitle.getImage1().equals("")) {
|
||||||
if (groupPosition == child_position) {
|
img_camera1.setBackgroundResource(R.mipmap.camera_orange);
|
||||||
headerTitle.setImage2(img2);
|
} else {
|
||||||
img2 = "";
|
img_camera1.setBackgroundResource(R.mipmap.camera_green);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
if (headerTitle.getImage2().equals("")) {
|
|
||||||
img_camera2.setBackgroundResource(R.mipmap.camera);
|
img_camera2.setOnClickListener(new View.OnClickListener() {
|
||||||
|
@Override
|
||||||
|
public void onClick(View v) {
|
||||||
|
//String date = new Date().toLocaleString().toString();
|
||||||
|
//String tempDate = new Date().toLocaleString().toString().replace(' ', '_').replace(',', '_').replace(':', '-');
|
||||||
|
|
||||||
|
_pathforcheck = "Stock_Cam2_" + store_id + "_" + headerTitle.getBrand_id() + "_" + visit_date.replace("/", "") + "_" + getCurrentTime().replace(":", "") + ".jpg";
|
||||||
|
child_position = groupPosition;
|
||||||
|
path = str + _pathforcheck;
|
||||||
|
|
||||||
|
startCameraActivity2(groupPosition);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
if (!img2.equalsIgnoreCase("")) {
|
||||||
|
if (groupPosition == child_position) {
|
||||||
|
headerTitle.setImage2(img2);
|
||||||
|
img2 = "";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (headerTitle.getImage2().equals("")) {
|
||||||
|
img_camera2.setBackgroundResource(R.mipmap.camera_orange);
|
||||||
|
} else {
|
||||||
|
img_camera2.setBackgroundResource(R.mipmap.camera_green);
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
img_camera2.setBackgroundResource(R.mipmap.camera_done);
|
//Camera allow disable
|
||||||
|
img_camera1.setBackgroundResource(R.mipmap.camera_grey);
|
||||||
|
img_camera2.setBackgroundResource(R.mipmap.camera_grey);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
if (!checkflag) {
|
if (!checkflag) {
|
||||||
if (checkHeaderArray.contains(groupPosition)) {
|
if (checkHeaderArray.contains(groupPosition)) {
|
||||||
txt_stockFaceupHeader.setTextColor(getResources().getColor(android.R.color.holo_red_dark));
|
txt_stockFaceupHeader.setTextColor(getResources().getColor(android.R.color.holo_red_dark));
|
||||||
@@ -557,234 +876,4 @@ public class Stock_FacingActivity extends AppCompatActivity {
|
|||||||
TextView txt_skuName;
|
TextView txt_skuName;
|
||||||
LinearLayout lin_category;
|
LinearLayout lin_category;
|
||||||
}
|
}
|
||||||
|
|
||||||
boolean validateData(List<Stock_FacingGetterSetter> listDataHeader,
|
|
||||||
HashMap<Stock_FacingGetterSetter, List<Stock_FacingGetterSetter>> listDataChild) {
|
|
||||||
boolean flag = true;
|
|
||||||
checkHeaderArray.clear();
|
|
||||||
|
|
||||||
for (int i = 0; i < listDataHeader.size(); i++) {
|
|
||||||
String imagePath = listDataHeader.get(i).getImage1();
|
|
||||||
String imagePath1 = listDataHeader.get(i).getImage2();
|
|
||||||
|
|
||||||
for (int j = 0; j < listDataChild.get(listDataHeader.get(i)).size(); j++) {
|
|
||||||
String stock = listDataChild.get(listDataHeader.get(i)).get(j).getStock();
|
|
||||||
String faceup = listDataChild.get(listDataHeader.get(i)).get(j).getFacing();
|
|
||||||
|
|
||||||
if (!imagePath.equals("") || !imagePath1.equals("")) {
|
|
||||||
if (!stock.equals("0")) {
|
|
||||||
if (stock.equals("") || faceup.equals("")) {
|
|
||||||
if (!checkHeaderArray.contains(i)) {
|
|
||||||
checkHeaderArray.add(i);
|
|
||||||
}
|
|
||||||
|
|
||||||
flag = false;
|
|
||||||
Error_Message = "Please fill all the data";
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
if (stock.equals("")) {
|
|
||||||
if (!checkHeaderArray.contains(i)) {
|
|
||||||
checkHeaderArray.add(i);
|
|
||||||
}
|
|
||||||
|
|
||||||
flag = false;
|
|
||||||
Error_Message = "Please fill all the data";
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
if (!checkHeaderArray.contains(i)) {
|
|
||||||
checkHeaderArray.add(i);
|
|
||||||
}
|
|
||||||
|
|
||||||
flag = false;
|
|
||||||
Error_Message = "Please click either 1 image";
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (flag == false) {
|
|
||||||
checkflag = false;
|
|
||||||
break;
|
|
||||||
} else {
|
|
||||||
checkflag = true;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
//expListView.invalidate();
|
|
||||||
adapter.notifyDataSetChanged();
|
|
||||||
|
|
||||||
return checkflag;
|
|
||||||
}
|
|
||||||
|
|
||||||
private void startCameraActivity1(int position) {
|
|
||||||
try {
|
|
||||||
/*Log.e("Stock and Facing ", "startCameraActivity()");
|
|
||||||
File file = new File(path);
|
|
||||||
Uri outputFileUri = Uri.fromFile(file);
|
|
||||||
|
|
||||||
Intent intent = new Intent(android.provider.MediaStore.ACTION_IMAGE_CAPTURE);
|
|
||||||
intent.putExtra(MediaStore.EXTRA_OUTPUT, outputFileUri);
|
|
||||||
startActivityForResult(intent, position);*/
|
|
||||||
|
|
||||||
Log.i("Stock & Facing ", "startCameraActivity()");
|
|
||||||
File file = new File(path);
|
|
||||||
Uri outputFileUri = Uri.fromFile(file);
|
|
||||||
|
|
||||||
String defaultCameraPackage = "";
|
|
||||||
final PackageManager packageManager = 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);*/
|
|
||||||
|
|
||||||
if (android.os.Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT) {
|
|
||||||
if (list.get(n).loadLabel(packageManager).toString().equalsIgnoreCase("Camera")) {
|
|
||||||
defaultCameraPackage = list.get(n).packageName;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
if (list.get(n).loadLabel(packageManager).toString().equalsIgnoreCase("Gallery")) {
|
|
||||||
defaultCameraPackage = list.get(n).packageName;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
Intent intent = new Intent(android.provider.MediaStore.ACTION_IMAGE_CAPTURE);
|
|
||||||
intent.putExtra(MediaStore.EXTRA_OUTPUT, outputFileUri);
|
|
||||||
intent.setPackage(defaultCameraPackage);
|
|
||||||
startActivityForResult(intent, 1);
|
|
||||||
//startActivityForResult(intent, position);
|
|
||||||
|
|
||||||
} catch (Exception e) {
|
|
||||||
e.printStackTrace();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private void startCameraActivity2(int position) {
|
|
||||||
try {
|
|
||||||
/*Log.e("Stock and Facing ", "startCameraActivity()");
|
|
||||||
File file = new File(path);
|
|
||||||
Uri outputFileUri = Uri.fromFile(file);
|
|
||||||
|
|
||||||
Intent intent = new Intent(android.provider.MediaStore.ACTION_IMAGE_CAPTURE);
|
|
||||||
intent.putExtra(MediaStore.EXTRA_OUTPUT, outputFileUri);
|
|
||||||
startActivityForResult(intent, position);*/
|
|
||||||
|
|
||||||
Log.i("Stock & Facing ", "startCameraActivity()");
|
|
||||||
File file = new File(path);
|
|
||||||
Uri outputFileUri = Uri.fromFile(file);
|
|
||||||
|
|
||||||
String defaultCameraPackage = "";
|
|
||||||
final PackageManager packageManager = 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);*/
|
|
||||||
|
|
||||||
if (android.os.Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT) {
|
|
||||||
if (list.get(n).loadLabel(packageManager).toString().equalsIgnoreCase("Camera")) {
|
|
||||||
defaultCameraPackage = list.get(n).packageName;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
if (list.get(n).loadLabel(packageManager).toString().equalsIgnoreCase("Gallery")) {
|
|
||||||
defaultCameraPackage = list.get(n).packageName;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
Intent intent = new Intent(android.provider.MediaStore.ACTION_IMAGE_CAPTURE);
|
|
||||||
intent.putExtra(MediaStore.EXTRA_OUTPUT, outputFileUri);
|
|
||||||
intent.setPackage(defaultCameraPackage);
|
|
||||||
startActivityForResult(intent, 2);
|
|
||||||
//startActivityForResult(intent, position);
|
|
||||||
} catch (Exception e) {
|
|
||||||
e.printStackTrace();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
protected void onActivityResult(int requestCode, int resultCode, Intent data) {
|
|
||||||
Log.e("Stock & Facing", "resultCode: " + resultCode);
|
|
||||||
/*switch (resultCode) {
|
|
||||||
case 0:
|
|
||||||
Log.e("Stock & Facing", "User cancelled");
|
|
||||||
break;
|
|
||||||
case -1:
|
|
||||||
if (_pathforcheck != null && !_pathforcheck.equals("")) {
|
|
||||||
if (new File(str + _pathforcheck).exists()) {
|
|
||||||
img1 = _pathforcheck;
|
|
||||||
adapter.notifyDataSetChanged();
|
|
||||||
_pathforcheck = "";
|
|
||||||
}
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
}*/
|
|
||||||
|
|
||||||
switch (requestCode) {
|
|
||||||
case 1:
|
|
||||||
if (resultCode == -1) {
|
|
||||||
if (_pathforcheck != null && !_pathforcheck.equals("")) {
|
|
||||||
if (new File(str + _pathforcheck).exists()) {
|
|
||||||
img1 = _pathforcheck;
|
|
||||||
adapter.notifyDataSetChanged();
|
|
||||||
_pathforcheck = "";
|
|
||||||
}
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
Log.e("Stock & Facing", "User cancelled");
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
case 2:
|
|
||||||
if (resultCode == -1) {
|
|
||||||
if (_pathforcheck != null && !_pathforcheck.equals("")) {
|
|
||||||
if (new File(str + _pathforcheck).exists()) {
|
|
||||||
img2 = _pathforcheck;
|
|
||||||
adapter.notifyDataSetChanged();
|
|
||||||
_pathforcheck = "";
|
|
||||||
}
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
Log.e("Stock & Facing", "User cancelled");
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
super.onActivityResult(requestCode, resultCode, data);
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getCurrentTime() {
|
|
||||||
Calendar m_cal = Calendar.getInstance();
|
|
||||||
SimpleDateFormat formatter = new SimpleDateFormat("HH:mm:ss");
|
|
||||||
String cdate = formatter.format(m_cal.getTime());
|
|
||||||
/* String intime = m_cal.get(Calendar.HOUR_OF_DAY) + ":"
|
|
||||||
+ m_cal.get(Calendar.MINUTE) + ":" + m_cal.get(Calendar.SECOND);*/
|
|
||||||
|
|
||||||
return cdate;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public boolean onOptionsItemSelected(MenuItem item) {
|
|
||||||
// Handle action bar item clicks here. The action bar will
|
|
||||||
// automatically handle clicks on the Home/Up button, so long
|
|
||||||
// as you specify a parent activity in AndroidManifest.xml.
|
|
||||||
int id = item.getItemId();
|
|
||||||
|
|
||||||
if (id == android.R.id.home) {
|
|
||||||
finish();
|
|
||||||
}
|
|
||||||
|
|
||||||
//noinspection SimplifiableIfStatement
|
|
||||||
if (id == R.id.action_settings) {
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
return super.onOptionsItemSelected(item);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,173 @@
|
|||||||
|
package cpm.com.gskmtorange.gsk_dailyentry;
|
||||||
|
|
||||||
|
import android.content.Context;
|
||||||
|
import android.content.Intent;
|
||||||
|
import android.content.SharedPreferences;
|
||||||
|
import android.content.res.Resources;
|
||||||
|
import android.os.Bundle;
|
||||||
|
import android.preference.PreferenceManager;
|
||||||
|
import android.support.design.widget.FloatingActionButton;
|
||||||
|
import android.support.v7.app.AppCompatActivity;
|
||||||
|
import android.support.v7.widget.LinearLayoutManager;
|
||||||
|
import android.support.v7.widget.RecyclerView;
|
||||||
|
import android.support.v7.widget.Toolbar;
|
||||||
|
import android.view.LayoutInflater;
|
||||||
|
import android.view.MenuItem;
|
||||||
|
import android.view.View;
|
||||||
|
import android.view.ViewGroup;
|
||||||
|
import android.widget.LinearLayout;
|
||||||
|
import android.widget.TextView;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.Collections;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
import cpm.com.gskmtorange.Database.GSKOrangeDB;
|
||||||
|
import cpm.com.gskmtorange.R;
|
||||||
|
import cpm.com.gskmtorange.constant.CommonString;
|
||||||
|
import cpm.com.gskmtorange.xmlGetterSetter.CategoryWisePerformaceGetterSetter;
|
||||||
|
import cpm.com.gskmtorange.xmlGetterSetter.StoreWisePerformaceGetterSetter;
|
||||||
|
|
||||||
|
public class StoreWisePerformanceActivity extends AppCompatActivity {
|
||||||
|
RecyclerView recyclerView;
|
||||||
|
Toolbar toolbar;
|
||||||
|
|
||||||
|
ArrayList<StoreWisePerformaceGetterSetter> storeWisePerformanceList;
|
||||||
|
StoreWisePerformaceAdapter adapter;
|
||||||
|
|
||||||
|
GSKOrangeDB db;
|
||||||
|
private SharedPreferences preferences;
|
||||||
|
String store_id, visit_date, username, intime, date, keyAccount_id, class_id, storeType_id;
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected void onCreate(Bundle savedInstanceState) {
|
||||||
|
super.onCreate(savedInstanceState);
|
||||||
|
try {
|
||||||
|
setContentView(R.layout.activity_store_wise_performance);
|
||||||
|
|
||||||
|
toolbar = (Toolbar) findViewById(R.id.toolbar);
|
||||||
|
recyclerView = (RecyclerView) findViewById(R.id.recyclerView);
|
||||||
|
|
||||||
|
db = new GSKOrangeDB(this);
|
||||||
|
db.open();
|
||||||
|
|
||||||
|
//preference data
|
||||||
|
preferences = PreferenceManager.getDefaultSharedPreferences(this);
|
||||||
|
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, "");
|
||||||
|
|
||||||
|
toolbar.setTitle(getResources().getString(R.string.title_activity_store_wise_performance));
|
||||||
|
setSupportActionBar(toolbar);
|
||||||
|
getSupportActionBar().setHomeButtonEnabled(true);
|
||||||
|
getSupportActionBar().setDisplayHomeAsUpEnabled(true);
|
||||||
|
|
||||||
|
FloatingActionButton fab = (FloatingActionButton) findViewById(R.id.fab);
|
||||||
|
fab.setOnClickListener(new View.OnClickListener() {
|
||||||
|
@Override
|
||||||
|
public void onClick(View view) {
|
||||||
|
Intent intent = new Intent(StoreWisePerformanceActivity.this, CategoryListActivity.class);
|
||||||
|
startActivity(intent);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
} catch (Resources.NotFoundException e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected void onResume() {
|
||||||
|
super.onResume();
|
||||||
|
try {
|
||||||
|
storeWisePerformanceList = db.getStoreWisePerformance(store_id);
|
||||||
|
|
||||||
|
adapter = new StoreWisePerformaceAdapter(StoreWisePerformanceActivity.this, storeWisePerformanceList);
|
||||||
|
recyclerView.setAdapter(adapter);
|
||||||
|
recyclerView.setLayoutManager(new LinearLayoutManager(getApplicationContext()));
|
||||||
|
} catch (Exception e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public class StoreWisePerformaceAdapter extends RecyclerView.Adapter<StoreWisePerformaceAdapter.MyViewHolder> {
|
||||||
|
Context context;
|
||||||
|
private LayoutInflater inflator;
|
||||||
|
List<StoreWisePerformaceGetterSetter> list = Collections.emptyList();
|
||||||
|
|
||||||
|
public StoreWisePerformaceAdapter(Context context, List<StoreWisePerformaceGetterSetter> list) {
|
||||||
|
inflator = LayoutInflater.from(context);
|
||||||
|
this.list = list;
|
||||||
|
this.context = context;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public StoreWisePerformaceAdapter.MyViewHolder onCreateViewHolder(ViewGroup parent, int i) {
|
||||||
|
View view = inflator.inflate(R.layout.item_store_wise_performance, parent, false);
|
||||||
|
StoreWisePerformaceAdapter.MyViewHolder holder = new StoreWisePerformaceAdapter.MyViewHolder(view);
|
||||||
|
return holder;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onBindViewHolder(StoreWisePerformaceAdapter.MyViewHolder holder, int position) {
|
||||||
|
final StoreWisePerformaceGetterSetter categoryData = list.get(position);
|
||||||
|
|
||||||
|
if (categoryData.getPeriod().equalsIgnoreCase("LTM")) {
|
||||||
|
holder.txt_period.setText(getResources().getString(R.string.category_performance_ltm));
|
||||||
|
} else if (categoryData.getPeriod().equalsIgnoreCase("MTD")) {
|
||||||
|
holder.txt_period.setText(getResources().getString(R.string.category_performance_mtd));
|
||||||
|
} else if (categoryData.getPeriod().equalsIgnoreCase("LSV")) {
|
||||||
|
holder.txt_period.setText(getResources().getString(R.string.category_performance_lsv));
|
||||||
|
}
|
||||||
|
holder.txt_msl_availability.setText(categoryData.getMsl_availability());
|
||||||
|
holder.txt_sos.setText(categoryData.getSos());
|
||||||
|
holder.txt_t2p.setText(categoryData.getT2p());
|
||||||
|
holder.txt_promo.setText(categoryData.getPromo());
|
||||||
|
holder.txt_oss.setText(categoryData.getOss());
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int getItemCount() {
|
||||||
|
return list.size();
|
||||||
|
}
|
||||||
|
|
||||||
|
class MyViewHolder extends RecyclerView.ViewHolder {
|
||||||
|
TextView txt_period, txt_sos, txt_t2p, txt_promo, txt_msl_availability, txt_oss;
|
||||||
|
LinearLayout lay_menu;
|
||||||
|
|
||||||
|
public MyViewHolder(View itemView) {
|
||||||
|
super(itemView);
|
||||||
|
lay_menu = (LinearLayout) itemView.findViewById(R.id.lay_menu);
|
||||||
|
txt_period = (TextView) itemView.findViewById(R.id.txt_period);
|
||||||
|
txt_sos = (TextView) itemView.findViewById(R.id.txt_sos);
|
||||||
|
txt_t2p = (TextView) itemView.findViewById(R.id.txt_t2p);
|
||||||
|
txt_promo = (TextView) itemView.findViewById(R.id.txt_promo);
|
||||||
|
txt_msl_availability = (TextView) itemView.findViewById(R.id.txt_msl_availability);
|
||||||
|
txt_oss = (TextView) itemView.findViewById(R.id.txt_oss);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean onOptionsItemSelected(MenuItem item) {
|
||||||
|
// Handle action bar item clicks here. The action bar will
|
||||||
|
// automatically handle clicks on the Home/Up button, so long
|
||||||
|
// as you specify a parent activity in AndroidManifest.xml.
|
||||||
|
int id = item.getItemId();
|
||||||
|
|
||||||
|
if (id == android.R.id.home) {
|
||||||
|
finish();
|
||||||
|
}
|
||||||
|
|
||||||
|
//noinspection SimplifiableIfStatement
|
||||||
|
if (id == R.id.action_settings) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
return super.onOptionsItemSelected(item);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -31,6 +31,8 @@ import javax.xml.parsers.SAXParser;
|
|||||||
import javax.xml.parsers.SAXParserFactory;
|
import javax.xml.parsers.SAXParserFactory;
|
||||||
|
|
||||||
import cpm.com.gskmtorange.Database.GSKOrangeDB;
|
import cpm.com.gskmtorange.Database.GSKOrangeDB;
|
||||||
|
import cpm.com.gskmtorange.GetterSetter.AdditionalDialogGetterSetter;
|
||||||
|
import cpm.com.gskmtorange.GetterSetter.AddittionalGetterSetter;
|
||||||
import cpm.com.gskmtorange.GetterSetter.CoverageBean;
|
import cpm.com.gskmtorange.GetterSetter.CoverageBean;
|
||||||
import cpm.com.gskmtorange.GetterSetter.StoreBean;
|
import cpm.com.gskmtorange.GetterSetter.StoreBean;
|
||||||
import cpm.com.gskmtorange.R;
|
import cpm.com.gskmtorange.R;
|
||||||
@@ -46,30 +48,28 @@ import cpm.com.gskmtorange.xmlHandlers.FailureXMLHandler;
|
|||||||
|
|
||||||
public class UploadActivity extends AppCompatActivity {
|
public class UploadActivity extends AppCompatActivity {
|
||||||
|
|
||||||
private Dialog dialog;
|
|
||||||
private ProgressBar pb;
|
|
||||||
private TextView percentage, message;
|
|
||||||
GSKOrangeDB db;
|
GSKOrangeDB db;
|
||||||
ArrayList<CoverageBean> coverageList;
|
ArrayList<CoverageBean> coverageList;
|
||||||
|
|
||||||
private FailureGetterSetter failureGetterSetter = null;
|
|
||||||
private SharedPreferences preferences;
|
|
||||||
String date, userId, app_version;
|
String date, userId, app_version;
|
||||||
|
|
||||||
StoreBean storeData;
|
StoreBean storeData;
|
||||||
String datacheck = "";
|
String datacheck = "";
|
||||||
String[] words;
|
String[] words;
|
||||||
String validity;
|
String validity;
|
||||||
int mid;
|
int mid;
|
||||||
private int factor, k = 0;
|
|
||||||
String errormsg = "", Path;
|
String errormsg = "", Path;
|
||||||
|
|
||||||
Data data;
|
Data data;
|
||||||
|
|
||||||
ArrayList<MSL_AvailabilityGetterSetter> msl_availabilityList;
|
ArrayList<MSL_AvailabilityGetterSetter> msl_availabilityList;
|
||||||
ArrayList<Stock_FacingGetterSetter> stock_facingHeaderList, stock_facingChildList;
|
ArrayList<Stock_FacingGetterSetter> stock_facingHeaderList, stock_facingChildList;
|
||||||
ArrayList<Promo_Compliance_DataGetterSetter> promotionSkuList, additionalPromotionList;
|
ArrayList<Promo_Compliance_DataGetterSetter> promotionSkuList, additionalPromotionList;
|
||||||
ArrayList<T2PGetterSetter> t2PGetterSetters;
|
ArrayList<T2PGetterSetter> t2PGetterSetters;
|
||||||
|
ArrayList<AddittionalGetterSetter> additionalVisibilityList;
|
||||||
|
ArrayList<AdditionalDialogGetterSetter> additionalVisibilitySkuList;
|
||||||
|
private Dialog dialog;
|
||||||
|
private ProgressBar pb;
|
||||||
|
private TextView percentage, message;
|
||||||
|
private FailureGetterSetter failureGetterSetter = null;
|
||||||
|
private SharedPreferences preferences;
|
||||||
|
private int factor, k = 0;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void onCreate(Bundle savedInstanceState) {
|
protected void onCreate(Bundle savedInstanceState) {
|
||||||
@@ -92,6 +92,85 @@ public class UploadActivity extends AppCompatActivity {
|
|||||||
new UploadTask(this).execute();
|
new UploadTask(this).execute();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public String UploadImage(String path, String folder_name) throws Exception {
|
||||||
|
errormsg = "";
|
||||||
|
BitmapFactory.Options o = new BitmapFactory.Options();
|
||||||
|
o.inJustDecodeBounds = true;
|
||||||
|
BitmapFactory.decodeFile(Path + path, o);
|
||||||
|
|
||||||
|
// The new size we want to scale to
|
||||||
|
final int REQUIRED_SIZE = 1639;
|
||||||
|
|
||||||
|
// Find the correct scale value. It should be the power of 2.
|
||||||
|
int width_tmp = o.outWidth, height_tmp = o.outHeight;
|
||||||
|
int scale = 1;
|
||||||
|
|
||||||
|
while (true) {
|
||||||
|
if (width_tmp < REQUIRED_SIZE && height_tmp < REQUIRED_SIZE)
|
||||||
|
break;
|
||||||
|
width_tmp /= 2;
|
||||||
|
height_tmp /= 2;
|
||||||
|
scale *= 2;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Decode with inSampleSize
|
||||||
|
BitmapFactory.Options o2 = new BitmapFactory.Options();
|
||||||
|
o2.inSampleSize = scale;
|
||||||
|
Bitmap bitmap = BitmapFactory.decodeFile(Path + path, o2);
|
||||||
|
|
||||||
|
ByteArrayOutputStream bao = new ByteArrayOutputStream();
|
||||||
|
bitmap.compress(Bitmap.CompressFormat.JPEG, 90, bao);
|
||||||
|
byte[] ba = bao.toByteArray();
|
||||||
|
String ba1 = Base64.encodeBytes(ba);
|
||||||
|
|
||||||
|
SoapObject request = new SoapObject(CommonString.NAMESPACE, CommonString.METHOD_UPLOAD_IMAGE);
|
||||||
|
|
||||||
|
String[] split = path.split("/");
|
||||||
|
String path1 = split[split.length - 1];
|
||||||
|
|
||||||
|
request.addProperty("img", ba1);
|
||||||
|
request.addProperty("name", path1);
|
||||||
|
request.addProperty("FolderName", folder_name);
|
||||||
|
|
||||||
|
SoapSerializationEnvelope envelope = new SoapSerializationEnvelope(SoapEnvelope.VER11);
|
||||||
|
envelope.dotNet = true;
|
||||||
|
envelope.setOutputSoapObject(request);
|
||||||
|
|
||||||
|
HttpTransportSE androidHttpTransport = new HttpTransportSE(CommonString.URL);
|
||||||
|
androidHttpTransport.call(CommonString.SOAP_ACTION_UPLOAD_IMAGE, envelope);
|
||||||
|
|
||||||
|
Object result = envelope.getResponse();
|
||||||
|
|
||||||
|
if (!result.toString().equalsIgnoreCase(CommonString.KEY_SUCCESS)) {
|
||||||
|
if (result.toString().equalsIgnoreCase(CommonString.KEY_FALSE)) {
|
||||||
|
return CommonString.KEY_FALSE;
|
||||||
|
}
|
||||||
|
|
||||||
|
SAXParserFactory saxPF = SAXParserFactory.newInstance();
|
||||||
|
SAXParser saxP = saxPF.newSAXParser();
|
||||||
|
XMLReader xmlR = saxP.getXMLReader();
|
||||||
|
|
||||||
|
// for failure
|
||||||
|
FailureXMLHandler failureXMLHandler = new FailureXMLHandler();
|
||||||
|
xmlR.setContentHandler(failureXMLHandler);
|
||||||
|
|
||||||
|
InputSource is = new InputSource();
|
||||||
|
is.setCharacterStream(new StringReader(result.toString()));
|
||||||
|
xmlR.parse(is);
|
||||||
|
|
||||||
|
failureGetterSetter = failureXMLHandler.getFailureGetterSetter();
|
||||||
|
|
||||||
|
if (failureGetterSetter.getStatus().equalsIgnoreCase(CommonString.KEY_FAILURE)) {
|
||||||
|
errormsg = failureGetterSetter.getErrorMsg();
|
||||||
|
return CommonString.KEY_FAILURE;
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
new File(Path + path).delete();
|
||||||
|
}
|
||||||
|
|
||||||
|
return result.toString();
|
||||||
|
}
|
||||||
|
|
||||||
class Data {
|
class Data {
|
||||||
int value;
|
int value;
|
||||||
String name;
|
String name;
|
||||||
@@ -180,7 +259,7 @@ public class UploadActivity extends AppCompatActivity {
|
|||||||
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_UPLOAD_STORE_COVERAGE, envelope);
|
||||||
|
|
||||||
Object result = (Object) envelope.getResponse();
|
Object result = envelope.getResponse();
|
||||||
|
|
||||||
datacheck = result.toString();
|
datacheck = result.toString();
|
||||||
words = datacheck.split("\\;");
|
words = datacheck.split("\\;");
|
||||||
@@ -212,6 +291,7 @@ public class UploadActivity extends AppCompatActivity {
|
|||||||
+ "[CATEGORY_ID]" + Integer.parseInt(msl_availabilityList.get(j).getCategory_id()) + "[/CATEGORY_ID]"
|
+ "[CATEGORY_ID]" + Integer.parseInt(msl_availabilityList.get(j).getCategory_id()) + "[/CATEGORY_ID]"
|
||||||
+ "[BRAND_ID]" + Integer.parseInt(msl_availabilityList.get(j).getBrand_id()) + "[/BRAND_ID]"
|
+ "[BRAND_ID]" + Integer.parseInt(msl_availabilityList.get(j).getBrand_id()) + "[/BRAND_ID]"
|
||||||
+ "[SKU_ID]" + Integer.parseInt(msl_availabilityList.get(j).getSku_id()) + "[/SKU_ID]"
|
+ "[SKU_ID]" + Integer.parseInt(msl_availabilityList.get(j).getSku_id()) + "[/SKU_ID]"
|
||||||
|
+ "[MBQ]" + Integer.parseInt(msl_availabilityList.get(j).getMbq()) + "[/MBQ]"
|
||||||
//+ "[SKU]" + msl_availabilityList.get(j).getSku() + "[/SKU]"
|
//+ "[SKU]" + msl_availabilityList.get(j).getSku() + "[/SKU]"
|
||||||
+ "[TOGGLE_VALUE]" + Integer.parseInt(msl_availabilityList.get(j).getToggleValue()) + "[/TOGGLE_VALUE]"
|
+ "[TOGGLE_VALUE]" + Integer.parseInt(msl_availabilityList.get(j).getToggleValue()) + "[/TOGGLE_VALUE]"
|
||||||
+ "[/MSL_AVAILABILITY_DATA]";
|
+ "[/MSL_AVAILABILITY_DATA]";
|
||||||
@@ -235,7 +315,7 @@ public class UploadActivity extends AppCompatActivity {
|
|||||||
androidHttpTransport = new HttpTransportSE(CommonString.URL);
|
androidHttpTransport = new HttpTransportSE(CommonString.URL);
|
||||||
androidHttpTransport.call(CommonString.SOAP_ACTION + CommonString.METHOD_UPLOAD_STOCK_XML_DATA, envelope);
|
androidHttpTransport.call(CommonString.SOAP_ACTION + CommonString.METHOD_UPLOAD_STOCK_XML_DATA, envelope);
|
||||||
|
|
||||||
result = (Object) envelope.getResponse();
|
result = envelope.getResponse();
|
||||||
|
|
||||||
if (!result.toString().equalsIgnoreCase(CommonString.KEY_SUCCESS)) {
|
if (!result.toString().equalsIgnoreCase(CommonString.KEY_SUCCESS)) {
|
||||||
return CommonString.METHOD_UPLOAD_STOCK_XML_DATA;
|
return CommonString.METHOD_UPLOAD_STOCK_XML_DATA;
|
||||||
@@ -304,7 +384,7 @@ public class UploadActivity extends AppCompatActivity {
|
|||||||
androidHttpTransport = new HttpTransportSE(CommonString.URL);
|
androidHttpTransport = new HttpTransportSE(CommonString.URL);
|
||||||
androidHttpTransport.call(CommonString.SOAP_ACTION + CommonString.METHOD_UPLOAD_STOCK_XML_DATA, envelope);
|
androidHttpTransport.call(CommonString.SOAP_ACTION + CommonString.METHOD_UPLOAD_STOCK_XML_DATA, envelope);
|
||||||
|
|
||||||
result = (Object) envelope.getResponse();
|
result = envelope.getResponse();
|
||||||
|
|
||||||
if (!result.toString().equalsIgnoreCase(CommonString.KEY_SUCCESS)) {
|
if (!result.toString().equalsIgnoreCase(CommonString.KEY_SUCCESS)) {
|
||||||
return CommonString.METHOD_UPLOAD_STOCK_XML_DATA;
|
return CommonString.METHOD_UPLOAD_STOCK_XML_DATA;
|
||||||
@@ -363,7 +443,7 @@ public class UploadActivity extends AppCompatActivity {
|
|||||||
androidHttpTransport = new HttpTransportSE(CommonString.URL);
|
androidHttpTransport = new HttpTransportSE(CommonString.URL);
|
||||||
androidHttpTransport.call(CommonString.SOAP_ACTION + CommonString.METHOD_UPLOAD_STOCK_XML_DATA, envelope);
|
androidHttpTransport.call(CommonString.SOAP_ACTION + CommonString.METHOD_UPLOAD_STOCK_XML_DATA, envelope);
|
||||||
|
|
||||||
result = (Object) envelope.getResponse();
|
result = envelope.getResponse();
|
||||||
|
|
||||||
if (!result.toString().equalsIgnoreCase(CommonString.KEY_SUCCESS)) {
|
if (!result.toString().equalsIgnoreCase(CommonString.KEY_SUCCESS)) {
|
||||||
return CommonString.METHOD_UPLOAD_STOCK_XML_DATA;
|
return CommonString.METHOD_UPLOAD_STOCK_XML_DATA;
|
||||||
@@ -422,7 +502,7 @@ public class UploadActivity extends AppCompatActivity {
|
|||||||
androidHttpTransport = new HttpTransportSE(CommonString.URL);
|
androidHttpTransport = new HttpTransportSE(CommonString.URL);
|
||||||
androidHttpTransport.call(CommonString.SOAP_ACTION + CommonString.METHOD_UPLOAD_STOCK_XML_DATA, envelope);
|
androidHttpTransport.call(CommonString.SOAP_ACTION + CommonString.METHOD_UPLOAD_STOCK_XML_DATA, envelope);
|
||||||
|
|
||||||
result = (Object) envelope.getResponse();
|
result = envelope.getResponse();
|
||||||
|
|
||||||
if (!result.toString().equalsIgnoreCase(CommonString.KEY_SUCCESS)) {
|
if (!result.toString().equalsIgnoreCase(CommonString.KEY_SUCCESS)) {
|
||||||
return CommonString.METHOD_UPLOAD_STOCK_XML_DATA;
|
return CommonString.METHOD_UPLOAD_STOCK_XML_DATA;
|
||||||
@@ -440,7 +520,116 @@ public class UploadActivity extends AppCompatActivity {
|
|||||||
data.name = "Additional Promotion Data Uploading";
|
data.name = "Additional Promotion Data Uploading";
|
||||||
publishProgress(data);
|
publishProgress(data);
|
||||||
|
|
||||||
//T2p Upload Data
|
|
||||||
|
////ashish open
|
||||||
|
|
||||||
|
//Additional Visibility Data
|
||||||
|
String additional_visibility_data_xml = "";
|
||||||
|
String additional_visibility_dialog_xml = "";
|
||||||
|
onXML = "";
|
||||||
|
String onXMLdIALOG = "";
|
||||||
|
additionalVisibilityList = db.getAdditionalStock(coverageList.get(i).getStoreId());
|
||||||
|
|
||||||
|
if (additionalVisibilityList.size() > 0) {
|
||||||
|
for (int J = 0; J < additionalVisibilityList.size(); J++) {
|
||||||
|
|
||||||
|
String KeyID = additionalVisibilityList.get(J).getKey_id();
|
||||||
|
|
||||||
|
additionalVisibilitySkuList = db.getDialogStock(KeyID);
|
||||||
|
|
||||||
|
for (int k = 0; k < additionalVisibilitySkuList.size(); k++) {
|
||||||
|
|
||||||
|
|
||||||
|
onXMLdIALOG = "[VISIBILITY_DAILOG]"
|
||||||
|
+ "[MID]" + mid + "[/MID]"
|
||||||
|
+ "[USER_ID]"
|
||||||
|
+ userId
|
||||||
|
+ "[/USER_ID]"
|
||||||
|
+ "[KEY_ID]"
|
||||||
|
+ additionalVisibilitySkuList.get(k).getKEY_ID()
|
||||||
|
+ "[/KEY_ID]"
|
||||||
|
/* + "[DIALOG_BRAND_ID]"
|
||||||
|
+ additionalVisibilitySkuList.get(k).getBrand_id()
|
||||||
|
+ "[/DIALOG_BRAND_ID]"*/
|
||||||
|
+ "[SKU_ID]"
|
||||||
|
+ additionalVisibilitySkuList.get(k).getSku_id()
|
||||||
|
+ "[/SKU_ID]"
|
||||||
|
+ "[QUANTITY]"
|
||||||
|
+ additionalVisibilitySkuList.get(k).getQuantity()
|
||||||
|
+ "[/QUANTITY]"
|
||||||
|
+ "[/VISIBILITY_DAILOG]";
|
||||||
|
|
||||||
|
additional_visibility_dialog_xml = additional_visibility_dialog_xml + onXMLdIALOG;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
onXML = "[ADDITIONAL_VISIBILITY_DATA]"
|
||||||
|
+ "[MID]" + mid + "[/MID]"
|
||||||
|
+ "[USER_ID]"
|
||||||
|
+ userId
|
||||||
|
+ "[/USER_ID]"
|
||||||
|
+ "[KEY_ID]"
|
||||||
|
+ additionalVisibilityList.get(J).getKey_id()
|
||||||
|
+ "[/KEY_ID]"
|
||||||
|
+ "[ADDITIONAL_DISPLAY]"
|
||||||
|
+ additionalVisibilityList.get(J).getBtn_toogle()
|
||||||
|
+ "[/ADDITIONAL_DISPLAY]"
|
||||||
|
+ "[BRAND_ID]"
|
||||||
|
+ additionalVisibilityList.get(J).getBrand_id()
|
||||||
|
+ "[/BRAND_ID]"
|
||||||
|
+ "[IMAGE_URL]"
|
||||||
|
+ additionalVisibilityList.get(J).getImage()
|
||||||
|
+ "[/IMAGE_URL]"
|
||||||
|
+ "[DISPLAY_ID]"
|
||||||
|
+ additionalVisibilityList.get(J).getSku_id()
|
||||||
|
+ "[/DISPLAY_ID]"
|
||||||
|
+ "[SKU_LIST]"
|
||||||
|
+ additional_visibility_dialog_xml
|
||||||
|
+ "[/SKU_LIST]"
|
||||||
|
+ "[/ADDITIONAL_VISIBILITY_DATA]";
|
||||||
|
|
||||||
|
additional_visibility_data_xml = additional_visibility_data_xml + onXML;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
final String sos_xml = "[DATA]" + additional_visibility_data_xml + "[/DATA]";
|
||||||
|
|
||||||
|
request = new SoapObject(CommonString.NAMESPACE, CommonString.METHOD_UPLOAD_STOCK_XML_DATA);
|
||||||
|
request.addProperty("XMLDATA", sos_xml);
|
||||||
|
request.addProperty("KEYS", "ADDITIONAL_VISIBILITY_DATA");
|
||||||
|
request.addProperty("USERNAME", userId);
|
||||||
|
request.addProperty("MID", mid);
|
||||||
|
|
||||||
|
envelope = new SoapSerializationEnvelope(SoapEnvelope.VER11);
|
||||||
|
envelope.dotNet = true;
|
||||||
|
envelope.setOutputSoapObject(request);
|
||||||
|
|
||||||
|
androidHttpTransport = new HttpTransportSE(CommonString.URL);
|
||||||
|
androidHttpTransport.call(CommonString.SOAP_ACTION + CommonString.METHOD_UPLOAD_STOCK_XML_DATA, envelope);
|
||||||
|
|
||||||
|
result = envelope.getResponse();
|
||||||
|
|
||||||
|
if (!result.toString().equalsIgnoreCase(CommonString.KEY_SUCCESS)) {
|
||||||
|
return CommonString.METHOD_UPLOAD_STOCK_XML_DATA;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (result.toString().equalsIgnoreCase(CommonString.KEY_NO_DATA)) {
|
||||||
|
return CommonString.METHOD_UPLOAD_STOCK_XML_DATA;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (result.toString().equalsIgnoreCase(CommonString.KEY_FAILURE)) {
|
||||||
|
return CommonString.METHOD_UPLOAD_STOCK_XML_DATA;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
data.value = 35;
|
||||||
|
data.name = "Additional Visibility Data";
|
||||||
|
publishProgress(data);
|
||||||
|
|
||||||
|
/////ashish close
|
||||||
|
|
||||||
|
//T2p Upload Data
|
||||||
|
|
||||||
String t2p_data_xml = "";
|
String t2p_data_xml = "";
|
||||||
onXML = "";
|
onXML = "";
|
||||||
@@ -562,7 +751,7 @@ public class UploadActivity extends AppCompatActivity {
|
|||||||
androidHttpTransport = new HttpTransportSE(CommonString.URL);
|
androidHttpTransport = new HttpTransportSE(CommonString.URL);
|
||||||
androidHttpTransport.call(CommonString.SOAP_ACTION + CommonString.METHOD_UPLOAD_STOCK_XML_DATA, envelope);
|
androidHttpTransport.call(CommonString.SOAP_ACTION + CommonString.METHOD_UPLOAD_STOCK_XML_DATA, envelope);
|
||||||
|
|
||||||
result = (Object) envelope.getResponse();
|
result = envelope.getResponse();
|
||||||
|
|
||||||
if (!result.toString().equalsIgnoreCase(CommonString.KEY_SUCCESS)) {
|
if (!result.toString().equalsIgnoreCase(CommonString.KEY_SUCCESS)) {
|
||||||
return CommonString.METHOD_UPLOAD_STOCK_XML_DATA;
|
return CommonString.METHOD_UPLOAD_STOCK_XML_DATA;
|
||||||
@@ -576,11 +765,11 @@ public class UploadActivity extends AppCompatActivity {
|
|||||||
return CommonString.METHOD_UPLOAD_STOCK_XML_DATA;
|
return CommonString.METHOD_UPLOAD_STOCK_XML_DATA;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
data.value = 40;
|
data.value = 40;
|
||||||
data.name = "T2P Data Uploading";
|
data.name = "T2P Data Uploading";
|
||||||
publishProgress(data);
|
publishProgress(data);
|
||||||
|
|
||||||
|
|
||||||
//Image Upload
|
//Image Upload
|
||||||
|
|
||||||
//Stock Facing Images Upload
|
//Stock Facing Images Upload
|
||||||
@@ -680,7 +869,7 @@ public class UploadActivity extends AppCompatActivity {
|
|||||||
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 + CommonString.METHOD_UPLOAD_COVERAGE_STATUS, envelope);
|
||||||
|
|
||||||
result = (Object) envelope.getResponse();
|
result = envelope.getResponse();
|
||||||
|
|
||||||
if (!result.toString().equalsIgnoreCase(CommonString.KEY_SUCCESS)) {
|
if (!result.toString().equalsIgnoreCase(CommonString.KEY_SUCCESS)) {
|
||||||
return CommonString.METHOD_UPLOAD_COVERAGE_STATUS;
|
return CommonString.METHOD_UPLOAD_COVERAGE_STATUS;
|
||||||
@@ -723,83 +912,4 @@ public class UploadActivity extends AppCompatActivity {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public String UploadImage(String path, String folder_name) throws Exception {
|
|
||||||
errormsg = "";
|
|
||||||
BitmapFactory.Options o = new BitmapFactory.Options();
|
|
||||||
o.inJustDecodeBounds = true;
|
|
||||||
BitmapFactory.decodeFile(Path + path, o);
|
|
||||||
|
|
||||||
// The new size we want to scale to
|
|
||||||
final int REQUIRED_SIZE = 1639;
|
|
||||||
|
|
||||||
// Find the correct scale value. It should be the power of 2.
|
|
||||||
int width_tmp = o.outWidth, height_tmp = o.outHeight;
|
|
||||||
int scale = 1;
|
|
||||||
|
|
||||||
while (true) {
|
|
||||||
if (width_tmp < REQUIRED_SIZE && height_tmp < REQUIRED_SIZE)
|
|
||||||
break;
|
|
||||||
width_tmp /= 2;
|
|
||||||
height_tmp /= 2;
|
|
||||||
scale *= 2;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Decode with inSampleSize
|
|
||||||
BitmapFactory.Options o2 = new BitmapFactory.Options();
|
|
||||||
o2.inSampleSize = scale;
|
|
||||||
Bitmap bitmap = BitmapFactory.decodeFile(Path + path, o2);
|
|
||||||
|
|
||||||
ByteArrayOutputStream bao = new ByteArrayOutputStream();
|
|
||||||
bitmap.compress(Bitmap.CompressFormat.JPEG, 90, bao);
|
|
||||||
byte[] ba = bao.toByteArray();
|
|
||||||
String ba1 = Base64.encodeBytes(ba);
|
|
||||||
|
|
||||||
SoapObject request = new SoapObject(CommonString.NAMESPACE, CommonString.METHOD_UPLOAD_IMAGE);
|
|
||||||
|
|
||||||
String[] split = path.split("/");
|
|
||||||
String path1 = split[split.length - 1];
|
|
||||||
|
|
||||||
request.addProperty("img", ba1);
|
|
||||||
request.addProperty("name", path1);
|
|
||||||
request.addProperty("FolderName", folder_name);
|
|
||||||
|
|
||||||
SoapSerializationEnvelope envelope = new SoapSerializationEnvelope(SoapEnvelope.VER11);
|
|
||||||
envelope.dotNet = true;
|
|
||||||
envelope.setOutputSoapObject(request);
|
|
||||||
|
|
||||||
HttpTransportSE androidHttpTransport = new HttpTransportSE(CommonString.URL);
|
|
||||||
androidHttpTransport.call(CommonString.SOAP_ACTION_UPLOAD_IMAGE, envelope);
|
|
||||||
|
|
||||||
Object result = (Object) envelope.getResponse();
|
|
||||||
|
|
||||||
if (!result.toString().equalsIgnoreCase(CommonString.KEY_SUCCESS)) {
|
|
||||||
if (result.toString().equalsIgnoreCase(CommonString.KEY_FALSE)) {
|
|
||||||
return CommonString.KEY_FALSE;
|
|
||||||
}
|
|
||||||
|
|
||||||
SAXParserFactory saxPF = SAXParserFactory.newInstance();
|
|
||||||
SAXParser saxP = saxPF.newSAXParser();
|
|
||||||
XMLReader xmlR = saxP.getXMLReader();
|
|
||||||
|
|
||||||
// for failure
|
|
||||||
FailureXMLHandler failureXMLHandler = new FailureXMLHandler();
|
|
||||||
xmlR.setContentHandler(failureXMLHandler);
|
|
||||||
|
|
||||||
InputSource is = new InputSource();
|
|
||||||
is.setCharacterStream(new StringReader(result.toString()));
|
|
||||||
xmlR.parse(is);
|
|
||||||
|
|
||||||
failureGetterSetter = failureXMLHandler.getFailureGetterSetter();
|
|
||||||
|
|
||||||
if (failureGetterSetter.getStatus().equalsIgnoreCase(CommonString.KEY_FAILURE)) {
|
|
||||||
errormsg = failureGetterSetter.getErrorMsg();
|
|
||||||
return CommonString.KEY_FAILURE;
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
new File(Path + path).delete();
|
|
||||||
}
|
|
||||||
|
|
||||||
return result.toString();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -5,7 +5,23 @@ package cpm.com.gskmtorange.xmlGetterSetter;
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
public class CategoryWisePerformaceGetterSetter {
|
public class CategoryWisePerformaceGetterSetter {
|
||||||
String period, sos, t2p, promo, msl_availability, oss;
|
String store_id, category_id, period, msl_availability, sos, t2p, promo, oss, order_id;
|
||||||
|
|
||||||
|
public String getStore_id() {
|
||||||
|
return store_id;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setStore_id(String store_id) {
|
||||||
|
this.store_id = store_id;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getCategory_id() {
|
||||||
|
return category_id;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setCategory_id(String category_id) {
|
||||||
|
this.category_id = category_id;
|
||||||
|
}
|
||||||
|
|
||||||
public String getPeriod() {
|
public String getPeriod() {
|
||||||
return period;
|
return period;
|
||||||
@@ -15,6 +31,14 @@ public class CategoryWisePerformaceGetterSetter {
|
|||||||
this.period = period;
|
this.period = period;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public String getMsl_availability() {
|
||||||
|
return msl_availability;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setMsl_availability(String msl_availability) {
|
||||||
|
this.msl_availability = msl_availability;
|
||||||
|
}
|
||||||
|
|
||||||
public String getSos() {
|
public String getSos() {
|
||||||
return sos;
|
return sos;
|
||||||
}
|
}
|
||||||
@@ -39,14 +63,6 @@ public class CategoryWisePerformaceGetterSetter {
|
|||||||
this.promo = promo;
|
this.promo = promo;
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getMsl_availability() {
|
|
||||||
return msl_availability;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setMsl_availability(String msl_availability) {
|
|
||||||
this.msl_availability = msl_availability;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getOss() {
|
public String getOss() {
|
||||||
return oss;
|
return oss;
|
||||||
}
|
}
|
||||||
@@ -54,4 +70,12 @@ public class CategoryWisePerformaceGetterSetter {
|
|||||||
public void setOss(String oss) {
|
public void setOss(String oss) {
|
||||||
this.oss = oss;
|
this.oss = oss;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public String getOrder_id() {
|
||||||
|
return order_id;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setOrder_id(String order_id) {
|
||||||
|
this.order_id = order_id;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,65 @@
|
|||||||
|
package cpm.com.gskmtorange.xmlGetterSetter;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Created by gagang on 12-01-2017.
|
||||||
|
*/
|
||||||
|
|
||||||
|
public class MAPPING_PLANOGRAM_MasterGetterSetter {
|
||||||
|
String table_MAPPING_PLANOGRAM;
|
||||||
|
|
||||||
|
ArrayList<String> KEYACCOUNT_ID = new ArrayList<>();
|
||||||
|
ArrayList<String> STORETYPE_ID = new ArrayList<>();
|
||||||
|
ArrayList<String> CLASS_ID = new ArrayList<>();
|
||||||
|
ArrayList<String> PLANOGRAM_IMAGE = new ArrayList<>();
|
||||||
|
ArrayList<String> IMAGE_PATH = new ArrayList<>();
|
||||||
|
|
||||||
|
public String getTable_MAPPING_PLANOGRAM() {
|
||||||
|
return table_MAPPING_PLANOGRAM;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setTable_MAPPING_PLANOGRAM(String table_MAPPING_PLANOGRAM) {
|
||||||
|
this.table_MAPPING_PLANOGRAM = table_MAPPING_PLANOGRAM;
|
||||||
|
}
|
||||||
|
|
||||||
|
public ArrayList<String> getKEYACCOUNT_ID() {
|
||||||
|
return KEYACCOUNT_ID;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setKEYACCOUNT_ID(String KEYACCOUNT_ID) {
|
||||||
|
this.KEYACCOUNT_ID.add(KEYACCOUNT_ID);
|
||||||
|
}
|
||||||
|
|
||||||
|
public ArrayList<String> getSTORETYPE_ID() {
|
||||||
|
return STORETYPE_ID;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setSTORETYPE_ID(String STORETYPE_ID) {
|
||||||
|
this.STORETYPE_ID.add(STORETYPE_ID);
|
||||||
|
}
|
||||||
|
|
||||||
|
public ArrayList<String> getCLASS_ID() {
|
||||||
|
return CLASS_ID;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setCLASS_ID(String CLASS_ID) {
|
||||||
|
this.CLASS_ID.add(CLASS_ID);
|
||||||
|
}
|
||||||
|
|
||||||
|
public ArrayList<String> getPLANOGRAM_IMAGE() {
|
||||||
|
return PLANOGRAM_IMAGE;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setPLANOGRAM_IMAGE(String PLANOGRAM_IMAGE) {
|
||||||
|
this.PLANOGRAM_IMAGE.add(PLANOGRAM_IMAGE);
|
||||||
|
}
|
||||||
|
|
||||||
|
public ArrayList<String> getIMAGE_PATH() {
|
||||||
|
return IMAGE_PATH;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setIMAGE_PATH(String IMAGE_PATH) {
|
||||||
|
this.IMAGE_PATH.add(IMAGE_PATH);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,101 @@
|
|||||||
|
package cpm.com.gskmtorange.xmlGetterSetter;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Created by gagang on 11-01-2017.
|
||||||
|
*/
|
||||||
|
|
||||||
|
public class STORE_PERFORMANCE_MasterGetterSetter {
|
||||||
|
String table_STORE_PERFORMANCE;
|
||||||
|
|
||||||
|
ArrayList<String> STORE_ID = new ArrayList<>();
|
||||||
|
ArrayList<String> CATEGORY_ID = new ArrayList<>();
|
||||||
|
ArrayList<String> PERIOD = new ArrayList<>();
|
||||||
|
ArrayList<String> SOS = new ArrayList<>();
|
||||||
|
ArrayList<String> T2P = new ArrayList<>();
|
||||||
|
ArrayList<String> PROMO = new ArrayList<>();
|
||||||
|
ArrayList<String> MSL_AVAILABILITY = new ArrayList<>();
|
||||||
|
ArrayList<String> OSS = new ArrayList<>();
|
||||||
|
ArrayList<String> ORDERID = new ArrayList<>();
|
||||||
|
|
||||||
|
public String getTable_STORE_PERFORMANCE() {
|
||||||
|
return table_STORE_PERFORMANCE;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setTable_STORE_PERFORMANCE(String table_STORE_PERFORMANCE) {
|
||||||
|
this.table_STORE_PERFORMANCE = table_STORE_PERFORMANCE;
|
||||||
|
}
|
||||||
|
|
||||||
|
public ArrayList<String> getSTORE_ID() {
|
||||||
|
return STORE_ID;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setSTORE_ID(String STORE_ID) {
|
||||||
|
this.STORE_ID.add(STORE_ID);
|
||||||
|
}
|
||||||
|
|
||||||
|
public ArrayList<String> getCATEGORY_ID() {
|
||||||
|
return CATEGORY_ID;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setCATEGORY_ID(String CATEGORY_ID) {
|
||||||
|
this.CATEGORY_ID.add(CATEGORY_ID);
|
||||||
|
}
|
||||||
|
|
||||||
|
public ArrayList<String> getPERIOD() {
|
||||||
|
return PERIOD;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setPERIOD(String PERIOD) {
|
||||||
|
this.PERIOD.add(PERIOD);
|
||||||
|
}
|
||||||
|
|
||||||
|
public ArrayList<String> getSOS() {
|
||||||
|
return SOS;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setSOS(String SOS) {
|
||||||
|
this.SOS.add(SOS);
|
||||||
|
}
|
||||||
|
|
||||||
|
public ArrayList<String> getT2P() {
|
||||||
|
return T2P;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setT2P(String t2P) {
|
||||||
|
this.T2P.add(t2P);
|
||||||
|
}
|
||||||
|
|
||||||
|
public ArrayList<String> getPROMO() {
|
||||||
|
return PROMO;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setPROMO(String PROMO) {
|
||||||
|
this.PROMO.add(PROMO);
|
||||||
|
}
|
||||||
|
|
||||||
|
public ArrayList<String> getMSL_AVAILABILITY() {
|
||||||
|
return MSL_AVAILABILITY;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setMSL_AVAILABILITY(String MSL_AVAILABILITY) {
|
||||||
|
this.MSL_AVAILABILITY.add(MSL_AVAILABILITY);
|
||||||
|
}
|
||||||
|
|
||||||
|
public ArrayList<String> getOSS() {
|
||||||
|
return OSS;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setOSS(String OSS) {
|
||||||
|
this.OSS.add(OSS);
|
||||||
|
}
|
||||||
|
|
||||||
|
public ArrayList<String> getORDERID() {
|
||||||
|
return ORDERID;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setORDERID(String ORDERID) {
|
||||||
|
this.ORDERID.add(ORDERID);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,81 @@
|
|||||||
|
package cpm.com.gskmtorange.xmlGetterSetter;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Created by gagang on 23-12-2016.
|
||||||
|
*/
|
||||||
|
|
||||||
|
public class StoreWisePerformaceGetterSetter {
|
||||||
|
String store_id, category_id, period, msl_availability, sos, t2p, promo, oss, order_id;
|
||||||
|
|
||||||
|
public String getStore_id() {
|
||||||
|
return store_id;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setStore_id(String store_id) {
|
||||||
|
this.store_id = store_id;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getCategory_id() {
|
||||||
|
return category_id;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setCategory_id(String category_id) {
|
||||||
|
this.category_id = category_id;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getPeriod() {
|
||||||
|
return period;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setPeriod(String period) {
|
||||||
|
this.period = period;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getMsl_availability() {
|
||||||
|
return msl_availability;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setMsl_availability(String msl_availability) {
|
||||||
|
this.msl_availability = msl_availability;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getSos() {
|
||||||
|
return sos;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setSos(String sos) {
|
||||||
|
this.sos = sos;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getT2p() {
|
||||||
|
return t2p;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setT2p(String t2p) {
|
||||||
|
this.t2p = t2p;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getPromo() {
|
||||||
|
return promo;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setPromo(String promo) {
|
||||||
|
this.promo = promo;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getOss() {
|
||||||
|
return oss;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setOss(String oss) {
|
||||||
|
this.oss = oss;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getOrder_id() {
|
||||||
|
return order_id;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setOrder_id(String order_id) {
|
||||||
|
this.order_id = order_id;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -21,6 +21,9 @@ public class TableBean {
|
|||||||
|
|
||||||
//Gagan start code
|
//Gagan start code
|
||||||
public static String MAPPING_ADDITIONAL_PROMOTION;
|
public static String MAPPING_ADDITIONAL_PROMOTION;
|
||||||
|
public static String STORE_PERFORMANCE;
|
||||||
|
public static String MAPPING_PLANOGRAM;
|
||||||
|
|
||||||
//Gagan end code
|
//Gagan end code
|
||||||
|
|
||||||
public static String getJourneyPlan() {
|
public static String getJourneyPlan() {
|
||||||
@@ -129,5 +132,21 @@ public class TableBean {
|
|||||||
MAPPING_ADDITIONAL_PROMOTION = mappingAdditionalPromotion;
|
MAPPING_ADDITIONAL_PROMOTION = mappingAdditionalPromotion;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static String getStorePerformance() {
|
||||||
|
return STORE_PERFORMANCE;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static void setStorePerformance(String storePerformance) {
|
||||||
|
STORE_PERFORMANCE = storePerformance;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static String getMappingPlanogram() {
|
||||||
|
return MAPPING_PLANOGRAM;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static void setMappingPlanogram(String mappingPlanogram) {
|
||||||
|
MAPPING_PLANOGRAM = mappingPlanogram;
|
||||||
|
}
|
||||||
|
|
||||||
//Gagan end code
|
//Gagan end code
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -14,10 +14,12 @@ import cpm.com.gskmtorange.xmlGetterSetter.JourneyPlanGetterSetter;
|
|||||||
import cpm.com.gskmtorange.xmlGetterSetter.LoginGetterSetter;
|
import cpm.com.gskmtorange.xmlGetterSetter.LoginGetterSetter;
|
||||||
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;
|
||||||
|
import cpm.com.gskmtorange.xmlGetterSetter.MAPPING_PLANOGRAM_MasterGetterSetter;
|
||||||
import cpm.com.gskmtorange.xmlGetterSetter.MappingDisplayChecklistGetterSetter;
|
import cpm.com.gskmtorange.xmlGetterSetter.MappingDisplayChecklistGetterSetter;
|
||||||
import cpm.com.gskmtorange.xmlGetterSetter.MappingPromotionGetterSetter;
|
import cpm.com.gskmtorange.xmlGetterSetter.MappingPromotionGetterSetter;
|
||||||
import cpm.com.gskmtorange.xmlGetterSetter.MappingStockGetterSetter;
|
import cpm.com.gskmtorange.xmlGetterSetter.MappingStockGetterSetter;
|
||||||
import cpm.com.gskmtorange.xmlGetterSetter.NonWorkingReasonGetterSetter;
|
import cpm.com.gskmtorange.xmlGetterSetter.NonWorkingReasonGetterSetter;
|
||||||
|
import cpm.com.gskmtorange.xmlGetterSetter.STORE_PERFORMANCE_MasterGetterSetter;
|
||||||
import cpm.com.gskmtorange.xmlGetterSetter.SkuMasterGetterSetter;
|
import cpm.com.gskmtorange.xmlGetterSetter.SkuMasterGetterSetter;
|
||||||
import cpm.com.gskmtorange.xmlGetterSetter.SubCategoryMasterGetterSetter;
|
import cpm.com.gskmtorange.xmlGetterSetter.SubCategoryMasterGetterSetter;
|
||||||
|
|
||||||
@@ -621,5 +623,89 @@ public class XMLHandlers {
|
|||||||
return map;
|
return map;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public static STORE_PERFORMANCE_MasterGetterSetter STORE_PERFORMANCEXMLHandler(XmlPullParser xpp, int eventType) {
|
||||||
|
STORE_PERFORMANCE_MasterGetterSetter st = new STORE_PERFORMANCE_MasterGetterSetter();
|
||||||
|
|
||||||
|
try {
|
||||||
|
while (xpp.getEventType() != XmlPullParser.END_DOCUMENT) {
|
||||||
|
if (xpp.getEventType() == XmlPullParser.START_TAG) {
|
||||||
|
|
||||||
|
if (xpp.getName().equals("META_DATA")) {
|
||||||
|
st.setTable_STORE_PERFORMANCE(xpp.nextText());
|
||||||
|
}
|
||||||
|
if (xpp.getName().equals("STORE_ID")) {
|
||||||
|
st.setSTORE_ID(xpp.nextText());
|
||||||
|
}
|
||||||
|
if (xpp.getName().equals("CATEGORY_ID")) {
|
||||||
|
st.setCATEGORY_ID(xpp.nextText());
|
||||||
|
}
|
||||||
|
if (xpp.getName().equals("PERIOD")) {
|
||||||
|
st.setPERIOD(xpp.nextText());
|
||||||
|
}
|
||||||
|
if (xpp.getName().equals("SOS")) {
|
||||||
|
st.setSOS(xpp.nextText());
|
||||||
|
}
|
||||||
|
if (xpp.getName().equals("T2P")) {
|
||||||
|
st.setT2P(xpp.nextText());
|
||||||
|
}
|
||||||
|
if (xpp.getName().equals("PROMO")) {
|
||||||
|
st.setPROMO(xpp.nextText());
|
||||||
|
}
|
||||||
|
if (xpp.getName().equals("MSL_AVAILABILITY")) {
|
||||||
|
st.setMSL_AVAILABILITY(xpp.nextText());
|
||||||
|
}
|
||||||
|
if (xpp.getName().equals("OSS")) {
|
||||||
|
st.setOSS(xpp.nextText());
|
||||||
|
}
|
||||||
|
if (xpp.getName().equals("ORDERID")) {
|
||||||
|
st.setORDERID(xpp.nextText());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
xpp.next();
|
||||||
|
}
|
||||||
|
} catch (XmlPullParserException e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
} catch (IOException e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
}
|
||||||
|
return st;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static MAPPING_PLANOGRAM_MasterGetterSetter MAPPING_PLANOGRAM_XMLHandler(XmlPullParser xpp, int eventType) {
|
||||||
|
MAPPING_PLANOGRAM_MasterGetterSetter st = new MAPPING_PLANOGRAM_MasterGetterSetter();
|
||||||
|
|
||||||
|
try {
|
||||||
|
while (xpp.getEventType() != XmlPullParser.END_DOCUMENT) {
|
||||||
|
if (xpp.getEventType() == XmlPullParser.START_TAG) {
|
||||||
|
|
||||||
|
if (xpp.getName().equals("META_DATA")) {
|
||||||
|
st.setTable_MAPPING_PLANOGRAM(xpp.nextText());
|
||||||
|
}
|
||||||
|
if (xpp.getName().equals("KEYACCOUNT_ID")) {
|
||||||
|
st.setKEYACCOUNT_ID(xpp.nextText());
|
||||||
|
}
|
||||||
|
if (xpp.getName().equals("STORETYPE_ID")) {
|
||||||
|
st.setSTORETYPE_ID(xpp.nextText());
|
||||||
|
}
|
||||||
|
if (xpp.getName().equals("CLASS_ID")) {
|
||||||
|
st.setCLASS_ID(xpp.nextText());
|
||||||
|
}
|
||||||
|
if (xpp.getName().equals("PLANOGRAM_IMAGE")) {
|
||||||
|
st.setPLANOGRAM_IMAGE(xpp.nextText());
|
||||||
|
}
|
||||||
|
if (xpp.getName().equals("IMAGE_PATH")) {
|
||||||
|
st.setIMAGE_PATH(xpp.nextText());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
xpp.next();
|
||||||
|
}
|
||||||
|
} catch (XmlPullParserException e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
} catch (IOException e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
}
|
||||||
|
return st;
|
||||||
|
}
|
||||||
//Gagan End Code
|
//Gagan End Code
|
||||||
}
|
}
|
||||||
|
|||||||
|
Before Width: | Height: | Size: 4.6 KiB |
|
Before Width: | Height: | Size: 8.5 KiB |
|
Before Width: | Height: | Size: 4.4 KiB |
|
Before Width: | Height: | Size: 8.4 KiB |
|
Before Width: | Height: | Size: 4.7 KiB |
|
Before Width: | Height: | Size: 8.4 KiB |
|
Before Width: | Height: | Size: 4.6 KiB After Width: | Height: | Size: 3.9 KiB |
|
Before Width: | Height: | Size: 8.5 KiB After Width: | Height: | Size: 7.9 KiB |
|
Before Width: | Height: | Size: 4.4 KiB After Width: | Height: | Size: 3.6 KiB |
|
Before Width: | Height: | Size: 8.4 KiB After Width: | Height: | Size: 7.6 KiB |
|
Before Width: | Height: | Size: 4.7 KiB After Width: | Height: | Size: 3.9 KiB |
|
Before Width: | Height: | Size: 8.4 KiB After Width: | Height: | Size: 7.7 KiB |
@@ -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"
|
||||||
|
android:fitsSystemWindows="true">
|
||||||
|
|
||||||
|
<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_store_wise_performance" />
|
||||||
|
|
||||||
|
<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="@drawable/right_arrow" />
|
||||||
|
|
||||||
|
</android.support.design.widget.CoordinatorLayout>
|
||||||
@@ -24,14 +24,123 @@
|
|||||||
android:text="Category Performance"
|
android:text="Category Performance"
|
||||||
android:textAppearance="?android:attr/textAppearanceMedium"
|
android:textAppearance="?android:attr/textAppearanceMedium"
|
||||||
android:textColor="@android:color/black"
|
android:textColor="@android:color/black"
|
||||||
android:visibility="gone"/>
|
android:visibility="gone" />
|
||||||
|
|
||||||
<android.support.v7.widget.RecyclerView
|
<LinearLayout
|
||||||
android:id="@+id/recyclerView"
|
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:paddingBottom="5dp"
|
android:orientation="vertical">
|
||||||
android:paddingTop="5dp" />
|
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:orientation="vertical">
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:gravity="center_vertical"
|
||||||
|
android:orientation="horizontal"
|
||||||
|
android:weightSum="30">
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_weight="5"
|
||||||
|
android:gravity="center"
|
||||||
|
android:padding="5dp"
|
||||||
|
android:text="@string/category_performance_period"
|
||||||
|
android:textAppearance="?android:attr/textAppearanceSmall"
|
||||||
|
android:textColor="#000" />
|
||||||
|
|
||||||
|
<View
|
||||||
|
android:layout_width="1dp"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:background="@color/colorPrimary" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_weight="5"
|
||||||
|
android:gravity="center"
|
||||||
|
android:padding="5dp"
|
||||||
|
android:text="@string/category_performance_msl_availability"
|
||||||
|
android:textAppearance="?android:attr/textAppearanceSmall"
|
||||||
|
android:textColor="#000" />
|
||||||
|
|
||||||
|
<View
|
||||||
|
android:layout_width="1dp"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:background="@color/colorPrimary" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_weight="5"
|
||||||
|
android:gravity="center"
|
||||||
|
android:padding="5dp"
|
||||||
|
android:text="@string/category_performance_sos"
|
||||||
|
android:textAppearance="?android:attr/textAppearanceSmall"
|
||||||
|
android:textColor="#000" />
|
||||||
|
|
||||||
|
<View
|
||||||
|
android:layout_width="1dp"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:background="@color/colorPrimary" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_weight="5"
|
||||||
|
android:gravity="center"
|
||||||
|
android:padding="5dp"
|
||||||
|
android:text="@string/category_performance_t2p"
|
||||||
|
android:textAppearance="?android:attr/textAppearanceSmall"
|
||||||
|
android:textColor="#000" />
|
||||||
|
|
||||||
|
<View
|
||||||
|
android:layout_width="1dp"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:background="@color/colorPrimary" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_weight="5"
|
||||||
|
android:gravity="center"
|
||||||
|
android:padding="5dp"
|
||||||
|
android:text="@string/category_performance_promo"
|
||||||
|
android:textAppearance="?android:attr/textAppearanceSmall"
|
||||||
|
android:textColor="#000" />
|
||||||
|
|
||||||
|
<View
|
||||||
|
android:layout_width="1dp"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:background="@color/colorPrimary" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_weight="5"
|
||||||
|
android:gravity="center"
|
||||||
|
android:padding="5dp"
|
||||||
|
android:text="@string/category_performance_oss"
|
||||||
|
android:textAppearance="?android:attr/textAppearanceSmall"
|
||||||
|
android:textColor="#000" />
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
<View
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="1dp"
|
||||||
|
android:background="#888" />
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
<android.support.v7.widget.RecyclerView
|
||||||
|
android:id="@+id/recyclerView"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:paddingBottom="5dp" />
|
||||||
|
</LinearLayout>
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
</RelativeLayout>
|
</RelativeLayout>
|
||||||
|
|||||||
@@ -0,0 +1,146 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<RelativeLayout 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/content_category_wise_performance"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
app:layout_behavior="@string/appbar_scrolling_view_behavior"
|
||||||
|
tools:showIn="@layout/activity_category_wise_performance">
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:orientation="vertical">
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/txt_categoryName"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:background="#FFF1710F"
|
||||||
|
android:paddingBottom="10dp"
|
||||||
|
android:paddingLeft="20dp"
|
||||||
|
android:paddingTop="10dp"
|
||||||
|
android:text="Category Performance"
|
||||||
|
android:textAppearance="?android:attr/textAppearanceMedium"
|
||||||
|
android:textColor="@android:color/black"
|
||||||
|
android:visibility="gone" />
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:orientation="vertical">
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:orientation="vertical">
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:gravity="center_vertical"
|
||||||
|
android:orientation="horizontal"
|
||||||
|
android:weightSum="30">
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_weight="5"
|
||||||
|
android:gravity="center"
|
||||||
|
android:padding="5dp"
|
||||||
|
android:text="@string/category_performance_period"
|
||||||
|
android:textAppearance="?android:attr/textAppearanceSmall"
|
||||||
|
android:textColor="#000" />
|
||||||
|
|
||||||
|
<View
|
||||||
|
android:layout_width="1dp"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:background="@color/colorPrimary" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_weight="5"
|
||||||
|
android:gravity="center"
|
||||||
|
android:padding="5dp"
|
||||||
|
android:text="@string/category_performance_msl_availability"
|
||||||
|
android:textAppearance="?android:attr/textAppearanceSmall"
|
||||||
|
android:textColor="#000" />
|
||||||
|
|
||||||
|
<View
|
||||||
|
android:layout_width="1dp"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:background="@color/colorPrimary" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_weight="5"
|
||||||
|
android:gravity="center"
|
||||||
|
android:padding="5dp"
|
||||||
|
android:text="@string/category_performance_sos"
|
||||||
|
android:textAppearance="?android:attr/textAppearanceSmall"
|
||||||
|
android:textColor="#000" />
|
||||||
|
|
||||||
|
<View
|
||||||
|
android:layout_width="1dp"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:background="@color/colorPrimary" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_weight="5"
|
||||||
|
android:gravity="center"
|
||||||
|
android:padding="5dp"
|
||||||
|
android:text="@string/category_performance_t2p"
|
||||||
|
android:textAppearance="?android:attr/textAppearanceSmall"
|
||||||
|
android:textColor="#000" />
|
||||||
|
|
||||||
|
<View
|
||||||
|
android:layout_width="1dp"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:background="@color/colorPrimary" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_weight="5"
|
||||||
|
android:gravity="center"
|
||||||
|
android:padding="5dp"
|
||||||
|
android:text="@string/category_performance_promo"
|
||||||
|
android:textAppearance="?android:attr/textAppearanceSmall"
|
||||||
|
android:textColor="#000" />
|
||||||
|
|
||||||
|
<View
|
||||||
|
android:layout_width="1dp"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:background="@color/colorPrimary" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_weight="5"
|
||||||
|
android:gravity="center"
|
||||||
|
android:padding="5dp"
|
||||||
|
android:text="@string/category_performance_oss"
|
||||||
|
android:textAppearance="?android:attr/textAppearanceSmall"
|
||||||
|
android:textColor="#000" />
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
<View
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="1dp"
|
||||||
|
android:background="#888" />
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
<android.support.v7.widget.RecyclerView
|
||||||
|
android:id="@+id/recyclerView"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:paddingBottom="5dp" />
|
||||||
|
</LinearLayout>
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
</RelativeLayout>
|
||||||
@@ -15,7 +15,6 @@
|
|||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:orientation="horizontal"
|
android:orientation="horizontal"
|
||||||
android:weightSum="30">
|
android:weightSum="30">
|
||||||
<!--android:background="#F1E9E9"-->
|
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/txt_period"
|
android:id="@+id/txt_period"
|
||||||
@@ -23,71 +22,15 @@
|
|||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:layout_weight="5"
|
android:layout_weight="5"
|
||||||
android:gravity="center"
|
android:gravity="center"
|
||||||
android:paddingBottom="5dp"
|
android:padding="5dp"
|
||||||
android:paddingTop="5dp"
|
|
||||||
android:text="Period"
|
android:text="Period"
|
||||||
android:textColor="#000"
|
android:textAppearance="?android:attr/textAppearanceSmall"
|
||||||
android:textSize="20sp"
|
android:textColor="#000" />
|
||||||
android:textStyle="bold" />
|
|
||||||
|
|
||||||
<View
|
<View
|
||||||
android:layout_width="1dp"
|
android:layout_width="1dp"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:background="#f2711f" />
|
android:background="@color/colorPrimary" />
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:id="@+id/txt_sos"
|
|
||||||
android:layout_width="0dp"
|
|
||||||
android:layout_height="match_parent"
|
|
||||||
android:layout_weight="5"
|
|
||||||
android:gravity="center"
|
|
||||||
android:paddingBottom="5dp"
|
|
||||||
android:paddingTop="5dp"
|
|
||||||
android:text="SOS"
|
|
||||||
android:textColor="#000"
|
|
||||||
android:textSize="15sp"
|
|
||||||
android:textStyle="bold" />
|
|
||||||
|
|
||||||
<View
|
|
||||||
android:layout_width="1dp"
|
|
||||||
android:layout_height="match_parent"
|
|
||||||
android:background="#f2711f" />
|
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:id="@+id/txt_t2p"
|
|
||||||
android:layout_width="0dp"
|
|
||||||
android:layout_height="match_parent"
|
|
||||||
android:layout_weight="5"
|
|
||||||
android:gravity="center"
|
|
||||||
android:paddingBottom="5dp"
|
|
||||||
android:paddingTop="5dp"
|
|
||||||
android:text="T2P"
|
|
||||||
android:textColor="#000"
|
|
||||||
android:textSize="15sp"
|
|
||||||
android:textStyle="bold" />
|
|
||||||
|
|
||||||
<View
|
|
||||||
android:layout_width="1dp"
|
|
||||||
android:layout_height="match_parent"
|
|
||||||
android:background="#f2711f" />
|
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:id="@+id/txt_promo"
|
|
||||||
android:layout_width="0dp"
|
|
||||||
android:layout_height="match_parent"
|
|
||||||
android:layout_weight="5"
|
|
||||||
android:gravity="center"
|
|
||||||
android:paddingBottom="5dp"
|
|
||||||
android:paddingTop="5dp"
|
|
||||||
android:text="Promo"
|
|
||||||
android:textColor="#000"
|
|
||||||
android:textSize="15sp"
|
|
||||||
android:textStyle="bold" />
|
|
||||||
|
|
||||||
<View
|
|
||||||
android:layout_width="1dp"
|
|
||||||
android:layout_height="match_parent"
|
|
||||||
android:background="#f2711f" />
|
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/txt_msl_availability"
|
android:id="@+id/txt_msl_availability"
|
||||||
@@ -95,17 +38,63 @@
|
|||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:layout_weight="5"
|
android:layout_weight="5"
|
||||||
android:gravity="center"
|
android:gravity="center"
|
||||||
android:paddingBottom="5dp"
|
android:padding="5dp"
|
||||||
android:paddingTop="5dp"
|
|
||||||
android:text="MSL Availability"
|
android:text="MSL Availability"
|
||||||
android:textColor="#000"
|
android:textAppearance="?android:attr/textAppearanceSmall"
|
||||||
android:textSize="15sp"
|
android:textColor="#000" />
|
||||||
android:textStyle="bold" />
|
|
||||||
|
|
||||||
<View
|
<View
|
||||||
android:layout_width="1dp"
|
android:layout_width="1dp"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:background="#f2711f" />
|
android:background="@color/colorPrimary" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/txt_sos"
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:layout_weight="5"
|
||||||
|
android:gravity="center"
|
||||||
|
android:padding="5dp"
|
||||||
|
android:text="SOS"
|
||||||
|
android:textAppearance="?android:attr/textAppearanceSmall"
|
||||||
|
android:textColor="#000" />
|
||||||
|
|
||||||
|
<View
|
||||||
|
android:layout_width="1dp"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:background="@color/colorPrimary" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/txt_t2p"
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:layout_weight="5"
|
||||||
|
android:gravity="center"
|
||||||
|
android:padding="5dp"
|
||||||
|
android:text="T2P"
|
||||||
|
android:textAppearance="?android:attr/textAppearanceSmall"
|
||||||
|
android:textColor="#000" />
|
||||||
|
|
||||||
|
<View
|
||||||
|
android:layout_width="1dp"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:background="@color/colorPrimary" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/txt_promo"
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:layout_weight="5"
|
||||||
|
android:gravity="center"
|
||||||
|
android:padding="5dp"
|
||||||
|
android:text="Promo"
|
||||||
|
android:textAppearance="?android:attr/textAppearanceSmall"
|
||||||
|
android:textColor="#000" />
|
||||||
|
|
||||||
|
<View
|
||||||
|
android:layout_width="1dp"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:background="@color/colorPrimary" />
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/txt_oss"
|
android:id="@+id/txt_oss"
|
||||||
@@ -113,12 +102,10 @@
|
|||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:layout_weight="5"
|
android:layout_weight="5"
|
||||||
android:gravity="center"
|
android:gravity="center"
|
||||||
android:paddingBottom="5dp"
|
android:padding="5dp"
|
||||||
android:paddingTop="5dp"
|
|
||||||
android:text="OSS"
|
android:text="OSS"
|
||||||
android:textColor="#000"
|
android:textAppearance="?android:attr/textAppearanceSmall"
|
||||||
android:textSize="15sp"
|
android:textColor="#000" />
|
||||||
android:textStyle="bold" />
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
<View
|
<View
|
||||||
|
|||||||
@@ -93,7 +93,9 @@
|
|||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="70dp"
|
android:layout_height="70dp"
|
||||||
android:layout_gravity="center"
|
android:layout_gravity="center"
|
||||||
android:background="@drawable/toggle_selector_background" />
|
android:background="@drawable/toggle_selector_background"
|
||||||
|
android:textOff="@string/no"
|
||||||
|
android:textOn="@string/yes" />
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
|
|||||||
@@ -23,57 +23,71 @@
|
|||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:layout_width="0dp"
|
android:layout_width="0dp"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:layout_weight="1"
|
android:layout_weight="1.5"
|
||||||
android:gravity="center_vertical"
|
android:orientation="horizontal"
|
||||||
android:orientation="vertical"
|
android:paddingTop="5dp"
|
||||||
android:paddingRight="10dp">
|
android:weightSum="2">
|
||||||
|
<!--android:gravity="center_vertical"-->
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/txt_stockFaceupHeader"
|
android:id="@+id/txt_stockFaceupHeader"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="0dp"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="match_parent"
|
||||||
android:paddingLeft="25dp"
|
android:layout_weight="1.4"
|
||||||
|
android:paddingLeft="20dp"
|
||||||
android:paddingRight="5dp"
|
android:paddingRight="5dp"
|
||||||
android:text="Brand Name "
|
android:text="Brand Name"
|
||||||
|
android:textAppearance="?android:attr/textAppearanceSmall"
|
||||||
|
android:textColor="#222" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/txt_sosHeader"
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:layout_weight=".6"
|
||||||
|
android:paddingRight="5dp"
|
||||||
|
android:text="@string/stock_facing_sos"
|
||||||
android:textAppearance="?android:attr/textAppearanceSmall"
|
android:textAppearance="?android:attr/textAppearanceSmall"
|
||||||
android:textColor="#222" />
|
android:textColor="#222" />
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
|
<!--Camera Images-->
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:layout_width="0dp"
|
android:layout_width="0dp"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:layout_weight="1"
|
android:layout_weight=".5"
|
||||||
android:gravity="center_vertical"
|
android:gravity="center_vertical"
|
||||||
android:orientation="horizontal">
|
android:orientation="horizontal">
|
||||||
|
|
||||||
<ImageView
|
<!--<ImageView
|
||||||
android:id="@+id/img_reference"
|
android:id="@+id/img_reference"
|
||||||
android:layout_width="30dp"
|
android:layout_width="30dp"
|
||||||
android:layout_height="30dp"
|
android:layout_height="30dp"
|
||||||
android:layout_marginRight="10dp"
|
android:layout_marginRight="10dp"
|
||||||
android:src="@mipmap/star" />
|
android:src="@mipmap/star" />-->
|
||||||
|
|
||||||
<ImageView
|
<ImageView
|
||||||
android:id="@+id/img_camera1"
|
android:id="@+id/img_camera1"
|
||||||
android:layout_width="30dp"
|
android:layout_width="30dp"
|
||||||
android:layout_height="30dp"
|
android:layout_height="30dp"
|
||||||
android:layout_marginRight="10dp"
|
android:layout_marginRight="10dp" />
|
||||||
android:src="@drawable/ic_menu_camera" />
|
<!--android:src="@drawable/ic_menu_camera"-->
|
||||||
|
|
||||||
<ImageView
|
<ImageView
|
||||||
android:id="@+id/img_camera2"
|
android:id="@+id/img_camera2"
|
||||||
android:layout_width="30dp"
|
android:layout_width="30dp"
|
||||||
android:layout_height="30dp"
|
android:layout_height="30dp"
|
||||||
android:layout_marginRight="10dp"
|
android:layout_marginRight="10dp" />
|
||||||
android:src="@drawable/ic_menu_camera" />
|
<!--android:src="@drawable/ic_menu_camera"-->
|
||||||
|
|
||||||
<ImageView
|
<!--<ImageView
|
||||||
android:id="@+id/img_edit"
|
android:id="@+id/img_edit"
|
||||||
android:layout_width="25dp"
|
android:layout_width="25dp"
|
||||||
android:layout_height="25dp"
|
android:layout_height="25dp"
|
||||||
android:layout_marginRight="20dp"
|
android:layout_marginRight="20dp"
|
||||||
android:src="@mipmap/no_camera" />
|
android:src="@mipmap/no_camera" />-->
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
</android.support.v7.widget.CardView>
|
</android.support.v7.widget.CardView>
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
@@ -0,0 +1,120 @@
|
|||||||
|
<?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"
|
||||||
|
android:orientation="vertical">
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:orientation="vertical">
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:id="@+id/lay_menu"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:orientation="horizontal"
|
||||||
|
android:weightSum="30">
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/txt_period"
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:layout_weight="5"
|
||||||
|
android:gravity="center"
|
||||||
|
android:padding="5dp"
|
||||||
|
android:text="Period"
|
||||||
|
android:textAppearance="?android:attr/textAppearanceSmall"
|
||||||
|
android:textColor="#000" />
|
||||||
|
|
||||||
|
<View
|
||||||
|
android:layout_width="1dp"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:background="@color/colorPrimary" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/txt_msl_availability"
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:layout_weight="5"
|
||||||
|
android:gravity="center"
|
||||||
|
android:padding="5dp"
|
||||||
|
android:text="MSL Availability"
|
||||||
|
android:textAppearance="?android:attr/textAppearanceSmall"
|
||||||
|
android:textColor="#000" />
|
||||||
|
|
||||||
|
<View
|
||||||
|
android:layout_width="1dp"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:background="@color/colorPrimary" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/txt_sos"
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:layout_weight="5"
|
||||||
|
android:gravity="center"
|
||||||
|
android:padding="5dp"
|
||||||
|
android:text="SOS"
|
||||||
|
android:textAppearance="?android:attr/textAppearanceSmall"
|
||||||
|
android:textColor="#000" />
|
||||||
|
|
||||||
|
<View
|
||||||
|
android:layout_width="1dp"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:background="@color/colorPrimary" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/txt_t2p"
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:layout_weight="5"
|
||||||
|
android:gravity="center"
|
||||||
|
android:padding="5dp"
|
||||||
|
android:text="T2P"
|
||||||
|
android:textAppearance="?android:attr/textAppearanceSmall"
|
||||||
|
android:textColor="#000" />
|
||||||
|
|
||||||
|
<View
|
||||||
|
android:layout_width="1dp"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:background="@color/colorPrimary" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/txt_promo"
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:layout_weight="5"
|
||||||
|
android:gravity="center"
|
||||||
|
android:padding="5dp"
|
||||||
|
android:text="Promo"
|
||||||
|
android:textAppearance="?android:attr/textAppearanceSmall"
|
||||||
|
android:textColor="#000" />
|
||||||
|
|
||||||
|
<View
|
||||||
|
android:layout_width="1dp"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:background="@color/colorPrimary" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/txt_oss"
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:layout_weight="5"
|
||||||
|
android:gravity="center"
|
||||||
|
android:padding="5dp"
|
||||||
|
android:text="OSS"
|
||||||
|
android:textAppearance="?android:attr/textAppearanceSmall"
|
||||||
|
android:textColor="#000" />
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
<View
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="1dp"
|
||||||
|
android:background="#888" />
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@@ -0,0 +1,66 @@
|
|||||||
|
<?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:orientation="vertical">
|
||||||
|
|
||||||
|
<!-- <android.support.v7.widget.CardView
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
card_view:cardCornerRadius="20dp">-->
|
||||||
|
|
||||||
|
<FrameLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent">
|
||||||
|
|
||||||
|
<!--Title and Image-->
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:background="#90888888"
|
||||||
|
android:orientation="vertical">
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/tv_title"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:background="@color/colorPrimary"
|
||||||
|
android:padding="10dp"
|
||||||
|
android:text="@string/stock_facing_planogram_dialog_title"
|
||||||
|
android:textAppearance="?android:attr/textAppearanceMedium"
|
||||||
|
android:textColor="@color/white" />
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:orientation="vertical">
|
||||||
|
|
||||||
|
<ImageView
|
||||||
|
android:id="@+id/img_planogram"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:layout_margin="10dp"
|
||||||
|
android:src="@drawable/sad_cloud"/>
|
||||||
|
</LinearLayout>
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
<!--Cancel Image-->
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_gravity="right"
|
||||||
|
android:layout_margin="5dp"
|
||||||
|
android:orientation="vertical">
|
||||||
|
|
||||||
|
<ImageView
|
||||||
|
android:id="@+id/img_cancel"
|
||||||
|
android:layout_width="35dp"
|
||||||
|
android:layout_height="35dp"
|
||||||
|
android:src="@mipmap/cancel" />
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
</FrameLayout>
|
||||||
|
<!--</android.support.v7.widget.CardView>-->
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
@@ -0,0 +1,10 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<menu xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
xmlns:app="http://schemas.android.com/apk/res-auto">
|
||||||
|
<item
|
||||||
|
android:id="@+id/action_planogram"
|
||||||
|
android:icon="@mipmap/star"
|
||||||
|
android:orderInCategory="100"
|
||||||
|
android:title="planogram"
|
||||||
|
app:showAsAction="always" />
|
||||||
|
</menu>
|
||||||
|
After Width: | Height: | Size: 995 B |
@@ -67,4 +67,58 @@
|
|||||||
<string name="title_activity_promo_compliance">Promosyon</string>
|
<string name="title_activity_promo_compliance">Promosyon</string>
|
||||||
|
|
||||||
|
|
||||||
|
<!--Gagan Start Code -->
|
||||||
|
<string name="title_activity_category_list">Kategoriler</string>
|
||||||
|
<string name="title_activity_category_wise_performance">Kategori Performansı</string>
|
||||||
|
<string name="title_activity_daily_main_menu">Günlük Veri Menüsü</string>
|
||||||
|
<string name="title_activity_msl__availability">Bulunurluk</string>
|
||||||
|
<string name="title_activity_stock_facing">Raf Payı</string>
|
||||||
|
|
||||||
|
<string name="daily_data_menu_msl_availability">Bulunurluk</string>
|
||||||
|
<string name="daily_data_menu_stock_facing">Raf Payı</string>
|
||||||
|
<string name="daily_data_menu_t2p">Kalıcı Teşhir</string>
|
||||||
|
<string name="daily_data_menu_additional_visibility">Ek Teşhir</string>
|
||||||
|
<string name="daily_data_menu_promo_compliance">Promosyon</string>
|
||||||
|
<string name="daily_data_menu_competition_tracking">Rakip Bilgisi</string>
|
||||||
|
<string name="daily_data_menu_additional_promotions">Promosyon</string>
|
||||||
|
|
||||||
|
<string name="msl_availability_sku">Ürün Adı</string>
|
||||||
|
<string name="msl_availability_mbq">X</string>
|
||||||
|
<string name="msl_availability_availability">Bulunurluk</string>
|
||||||
|
|
||||||
|
<string name="stock_facing_reference_image">Örnek Fotoğraf</string>
|
||||||
|
<string name="stock_facing_sku_name">Ürün Adı</string>
|
||||||
|
<string name="stock_facing_stock">X</string>
|
||||||
|
<string name="stock_facing_faceup">Önyüz</string>
|
||||||
|
<string name="stock_facing_sos_target">Raf Payı Hedefi</string>
|
||||||
|
<string name="stock_facing_sos">Raf Payi</string>
|
||||||
|
|
||||||
|
<string name="title_activity_promo_compliance">Promosyon</string>
|
||||||
|
|
||||||
|
<string name="promo_compliance_additional_promo">Additional Promos</string>
|
||||||
|
<string name="promo_compliance_promo">Promos</string>
|
||||||
|
<string name="promo_compliance_promos_sku">Promosyon Ürünü</string>
|
||||||
|
<string name="promo_compliance_sku">Promosyon Ürünü</string>
|
||||||
|
<string name="promo_compliance_inStock">Ürün Bulunuyor</string>
|
||||||
|
<string name="promo_compliance_promoAnnouncer">Duyuru Var</string>
|
||||||
|
<string name="promo_compliance_runningPOS">Kasa Okuyor</string>
|
||||||
|
<string name="promo_compliance_add">Add</string>
|
||||||
|
|
||||||
|
<string name="category_performance_period">Zaman</string>
|
||||||
|
<string name="category_performance_msl_availability">Bulunurluk</string>
|
||||||
|
<string name="category_performance_sos">Raf Payi</string>
|
||||||
|
<string name="category_performance_t2p">Kalici Teshir</string>
|
||||||
|
<string name="category_performance_promo">Promosyon</string>
|
||||||
|
<string name="category_performance_oss">TMP</string>
|
||||||
|
|
||||||
|
<string name="category_performance_ltm">Son 3 Ay</string>
|
||||||
|
<string name="category_performance_mtd">Bu Ay</string>
|
||||||
|
<string name="category_performance_lsv">Son Ziyaret</string>
|
||||||
|
|
||||||
|
<string name="title_activity_store_wise_performance">Mağaza Performansı</string>
|
||||||
|
<!--Gagan End Code -->
|
||||||
|
|
||||||
|
<!--Gagan start new code 2-->
|
||||||
|
<string name="stock_facing_planogram_dialog_title">Planogram</string>
|
||||||
|
<!--Gagan end new code 2-->
|
||||||
</resources>
|
</resources>
|
||||||
@@ -81,6 +81,7 @@
|
|||||||
<string name="stock_facing_stock">Stock</string>
|
<string name="stock_facing_stock">Stock</string>
|
||||||
<string name="stock_facing_faceup">Facing</string>
|
<string name="stock_facing_faceup">Facing</string>
|
||||||
<string name="stock_facing_sos_target">SOS Target</string>
|
<string name="stock_facing_sos_target">SOS Target</string>
|
||||||
|
<string name="stock_facing_sos">SOS</string>
|
||||||
|
|
||||||
<!--Gagan end code-->
|
<!--Gagan end code-->
|
||||||
|
|
||||||
@@ -121,6 +122,18 @@
|
|||||||
<string name="promo_compliance_runningPOS">Running on POS</string>
|
<string name="promo_compliance_runningPOS">Running on POS</string>
|
||||||
<string name="promo_compliance_add">Add</string>
|
<string name="promo_compliance_add">Add</string>
|
||||||
|
|
||||||
|
<string name="category_performance_period">Period</string>
|
||||||
|
<string name="category_performance_msl_availability">MSL Availability</string>
|
||||||
|
<string name="category_performance_sos">SOS</string>
|
||||||
|
<string name="category_performance_t2p">T2P</string>
|
||||||
|
<string name="category_performance_promo">Promo</string>
|
||||||
|
<string name="category_performance_oss">OSS</string>
|
||||||
|
|
||||||
|
<string name="category_performance_ltm">LTM</string>
|
||||||
|
<string name="category_performance_mtd">MTD</string>
|
||||||
|
<string name="category_performance_lsv">LSV</string>
|
||||||
|
|
||||||
|
<string name="title_activity_store_wise_performance">Store wise Performance</string>
|
||||||
<!--Gagan end new code 1-->
|
<!--Gagan end new code 1-->
|
||||||
|
|
||||||
|
|
||||||
@@ -145,5 +158,8 @@
|
|||||||
<string name="select_reason">Select Reason</string>
|
<string name="select_reason">Select Reason</string>
|
||||||
<string name="daily_activity_menu">Daily Data Menu</string>
|
<string name="daily_activity_menu">Daily Data Menu</string>
|
||||||
|
|
||||||
|
<!--Gagan start new code 2-->
|
||||||
|
<string name="stock_facing_planogram_dialog_title">Planogram</string>
|
||||||
|
<!--Gagan end new code 2-->
|
||||||
|
|
||||||
</resources>
|
</resources>
|
||||||
|
|||||||