Merge branch 'master' into ysy_temp_f
This commit is contained in:
@@ -51,12 +51,12 @@
|
||||
android:screenOrientation="portrait" />
|
||||
<activity
|
||||
android:name=".GeoTag.GeoTagStoreList"
|
||||
android:label="@string/title_activity_store_list_geotag"
|
||||
android:label="@string/title_activity_store_list"
|
||||
android:screenOrientation="portrait"
|
||||
android:theme="@style/AppTheme.NoActionBar" />
|
||||
<activity
|
||||
android:name=".dailyentry.StoreListActivity"
|
||||
android:label="@string/title_activity_store_list_geotag"
|
||||
android:label="@string/title_activity_store_list"
|
||||
android:screenOrientation="portrait"
|
||||
android:theme="@style/AppTheme.NoActionBar" />
|
||||
<activity
|
||||
|
||||
@@ -129,11 +129,39 @@ public class GSKOrangeDB extends SQLiteOpenHelper {
|
||||
public void deleteTableWithStoreID(String storeid) {
|
||||
|
||||
db.delete(CommonString.TABLE_COVERAGE_DATA, CommonString.KEY_STORE_ID + "='" + storeid + "'", null);
|
||||
db.delete(CommonString.CREATE_TABLE_STOCK_DIALOG_MAIN, CommonString.KEY_STORE_ID + "='" + storeid + "'", null);
|
||||
|
||||
db.delete(CommonString.CREATE_TABLE_INSERT_STOCK_ADDITIONAL_VISIBILITY_MAIN, CommonString.KEY_STORE_ID + "='" + storeid + "'", null);
|
||||
db.delete(CommonString.CREATE_TABLE_STOCK_DIALOG, CommonString.KEY_STORE_ID + "='" + storeid + "'", null);
|
||||
db.delete(CommonString.CREATE_TABLE_STOCK_ADDITIONAL_STOCK_DATA, CommonString.KEY_STORE_ID + "='" + storeid + "'", null);
|
||||
|
||||
//Gagan start code
|
||||
db.delete(CommonString.TABLE_INSERT_MSL_AVAILABILITY, "Store_Id='" + storeid + "'", null);
|
||||
db.delete(CommonString.TABLE_INSERT_STOCK_FACING_HEADER, "Store_Id='" + storeid + "'", null);
|
||||
db.delete(CommonString.TABLE_INSERT_STOCK_FACING_CHILD, "Store_Id='" + storeid + "'", null);
|
||||
db.delete(CommonString.TABLE_INSERT_ADDITIONAL_PROMO_COMPLIANCE, "STORE_ID='" + storeid + "'", null);
|
||||
db.delete(CommonString.TABLE_INSERT_PROMO_SKU, "STORE_ID='" + storeid + "'", null);
|
||||
//Gagan end code
|
||||
|
||||
}
|
||||
|
||||
public void deleteAllTables() {
|
||||
|
||||
db.delete(CommonString.TABLE_COVERAGE_DATA, null, null);
|
||||
|
||||
db.delete(CommonString.CREATE_TABLE_STOCK_DIALOG_MAIN, null, null);
|
||||
db.delete(CommonString.CREATE_TABLE_INSERT_STOCK_ADDITIONAL_VISIBILITY_MAIN, null, null);
|
||||
db.delete(CommonString.CREATE_TABLE_STOCK_DIALOG, null, null);
|
||||
db.delete(CommonString.CREATE_TABLE_STOCK_ADDITIONAL_STOCK_DATA, null, null);
|
||||
|
||||
//Gagan start code
|
||||
db.delete(CommonString.TABLE_INSERT_MSL_AVAILABILITY, null, null);
|
||||
db.delete(CommonString.TABLE_INSERT_STOCK_FACING_HEADER, null, null);
|
||||
db.delete(CommonString.TABLE_INSERT_STOCK_FACING_CHILD, null, null);
|
||||
db.delete(CommonString.TABLE_INSERT_ADDITIONAL_PROMO_COMPLIANCE, null, null);
|
||||
db.delete(CommonString.TABLE_INSERT_PROMO_SKU, null, null);
|
||||
//Gagan end code
|
||||
|
||||
}
|
||||
|
||||
public void InsertJCP(JourneyPlanGetterSetter data) {
|
||||
@@ -1879,21 +1907,23 @@ public class GSKOrangeDB extends SQLiteOpenHelper {
|
||||
Cursor dbcursor = null;
|
||||
|
||||
try {
|
||||
dbcursor = db.rawQuery("Select * from Stock_Facing_Header_Data " +
|
||||
"where Store_Id='" + store_id + "'", null);
|
||||
dbcursor = db.rawQuery("Select H.BRAND_ID, H.IMAGE1, H.IMAGE2, C.SKU_ID, C.STOCK_VALUE, C.FACEUP_VALUE " +
|
||||
"from Stock_Facing_Header_Data H " +
|
||||
"INNER JOIN Stock_Facing_Child_Data C " +
|
||||
"ON H.STORE_ID = C.STORE_ID AND H.CATEGORY_ID = C.CATEGORY_ID AND H.BRAND_ID = C.BRAND_ID " +
|
||||
"WHERE H.STORE_ID = '" + store_id + "'", null);
|
||||
|
||||
if (dbcursor != null) {
|
||||
dbcursor.moveToFirst();
|
||||
while (!dbcursor.isAfterLast()) {
|
||||
Stock_FacingGetterSetter cd = new Stock_FacingGetterSetter();
|
||||
|
||||
cd.setCategory_id(dbcursor.getString(dbcursor.getColumnIndexOrThrow("Category_Id")));
|
||||
cd.setSub_category_id(dbcursor.getString(dbcursor.getColumnIndexOrThrow("SUB_CATEGORY_ID")));
|
||||
cd.setSub_category(dbcursor.getString(dbcursor.getColumnIndexOrThrow("SUB_CATEGORY")));
|
||||
cd.setBrand_id(dbcursor.getString(dbcursor.getColumnIndexOrThrow("BRAND_ID")));
|
||||
cd.setBrand(dbcursor.getString(dbcursor.getColumnIndexOrThrow("BRAND")));
|
||||
cd.setImage1(dbcursor.getString(dbcursor.getColumnIndexOrThrow("IMAGE1")));
|
||||
cd.setImage2(dbcursor.getString(dbcursor.getColumnIndexOrThrow("IMAGE2")));
|
||||
cd.setSku_id(dbcursor.getString(dbcursor.getColumnIndexOrThrow("SKU_ID")));
|
||||
cd.setStock(dbcursor.getString(dbcursor.getColumnIndexOrThrow("STOCK_VALUE")));
|
||||
cd.setFacing(dbcursor.getString(dbcursor.getColumnIndexOrThrow("FACEUP_VALUE")));
|
||||
|
||||
list.add(cd);
|
||||
dbcursor.moveToNext();
|
||||
@@ -1908,7 +1938,7 @@ public class GSKOrangeDB extends SQLiteOpenHelper {
|
||||
return list;
|
||||
}
|
||||
|
||||
public ArrayList<Stock_FacingGetterSetter> getStockAndFacingSKUServerUploadData(String category_id, String brand_id) {
|
||||
/*public ArrayList<Stock_FacingGetterSetter> getStockAndFacingSKUServerUploadData(String category_id, String brand_id) {
|
||||
ArrayList<Stock_FacingGetterSetter> list = new ArrayList<>();
|
||||
Cursor dbcursor = null;
|
||||
|
||||
@@ -1942,7 +1972,7 @@ public class GSKOrangeDB extends SQLiteOpenHelper {
|
||||
return list;
|
||||
}
|
||||
return list;
|
||||
}
|
||||
}*/
|
||||
|
||||
//Promo Compliance Promotion Data
|
||||
public ArrayList<Promo_Compliance_DataGetterSetter> getPromoComplianceSkuServerUploadData(String store_id) {
|
||||
@@ -2244,10 +2274,6 @@ public class GSKOrangeDB extends SQLiteOpenHelper {
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
public void deleteStockEntryMainTable(String storeid, String categoryid) {
|
||||
try {
|
||||
|
||||
@@ -2262,14 +2288,6 @@ public class GSKOrangeDB extends SQLiteOpenHelper {
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
public ArrayList<BrandMasterGetterSetter> getBrandMasterData(String store_id) {
|
||||
Cursor cursordata = null;
|
||||
ArrayList<BrandMasterGetterSetter> Data = new ArrayList<BrandMasterGetterSetter>();
|
||||
@@ -2627,21 +2645,20 @@ public class GSKOrangeDB extends SQLiteOpenHelper {
|
||||
|
||||
long key_id = db.insert(CommonString.TABLE_INSERT_STOCK_ADDITIONAL_MAIN, null, values);
|
||||
|
||||
if(skulist!=null)
|
||||
{
|
||||
if (skulist != null) {
|
||||
|
||||
for (int j = 0; j < skulist.size(); j++) {
|
||||
values1.put(CommonString.KEY_Common_ID, key_id);
|
||||
values1.put(CommonString.KEY_STORE_ID, skulist.get(j).getStore_id());
|
||||
values1.put("categoryId", categoryId);
|
||||
values1.put(CommonString.KEY_BRAND, skulist.get(j).getBrand());
|
||||
values1.put(CommonString.KEY_BRAND_ID, skulist.get(j).getBrand_id());
|
||||
values1.put(CommonString.KEY_QUANTITY, skulist.get(j).getQuantity());
|
||||
values1.put(CommonString.KEY_SKU_ID, skulist.get(j).getSku_id());
|
||||
values1.put(CommonString.KEY_SKUNAME, skulist.get(j).getSku_name());
|
||||
for (int j = 0; j < skulist.size(); j++) {
|
||||
values1.put(CommonString.KEY_Common_ID, key_id);
|
||||
values1.put(CommonString.KEY_STORE_ID, skulist.get(j).getStore_id());
|
||||
values1.put("categoryId", categoryId);
|
||||
values1.put(CommonString.KEY_BRAND, skulist.get(j).getBrand());
|
||||
values1.put(CommonString.KEY_BRAND_ID, skulist.get(j).getBrand_id());
|
||||
values1.put(CommonString.KEY_QUANTITY, skulist.get(j).getQuantity());
|
||||
values1.put(CommonString.KEY_SKU_ID, skulist.get(j).getSku_id());
|
||||
values1.put(CommonString.KEY_SKUNAME, skulist.get(j).getSku_name());
|
||||
|
||||
db.insert(CommonString.TABLE_INSERT_STOCK_DIALOG_MAIN, null, values1);
|
||||
}
|
||||
db.insert(CommonString.TABLE_INSERT_STOCK_DIALOG_MAIN, null, values1);
|
||||
}
|
||||
}
|
||||
|
||||
} catch (Exception ex) {
|
||||
@@ -2759,8 +2776,8 @@ public class GSKOrangeDB extends SQLiteOpenHelper {
|
||||
try {
|
||||
|
||||
|
||||
dbcursor = db.rawQuery("SELECT * FROM " + CommonString.TABLE_INSERT_T2P_COMPLIANCE + " where " +
|
||||
CommonString.KEY_STORE_ID + "='" + store_id + "'", null);
|
||||
dbcursor = db.rawQuery("SELECT * FROM " + CommonString.TABLE_INSERT_T2P_COMPLIANCE + " where " +
|
||||
CommonString.KEY_STORE_ID + "='" + store_id + "'", null);
|
||||
|
||||
|
||||
if (dbcursor != null) {
|
||||
@@ -2865,6 +2882,7 @@ public class GSKOrangeDB extends SQLiteOpenHelper {
|
||||
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("CATEGORY_ID", data.getCATEGORY_ID().get(i));
|
||||
values.put("PLANOGRAM_IMAGE", data.getPLANOGRAM_IMAGE().get(i));
|
||||
values.put("IMAGE_PATH", data.getIMAGE_PATH().get(i));
|
||||
|
||||
@@ -2879,7 +2897,7 @@ public class GSKOrangeDB extends SQLiteOpenHelper {
|
||||
ArrayList<MAPPING_PLANOGRAM_DataGetterSetter> list = new ArrayList<>();
|
||||
Cursor dbcursor = null;
|
||||
try {
|
||||
dbcursor = db.rawQuery("SELECT * FROM MAPPING_PLANOGRAM", null);
|
||||
dbcursor = db.rawQuery("SELECT * FROM MAPPING_PLANOGRAM where CATEGORY_ID='" + category_id + "'", null);
|
||||
|
||||
if (dbcursor != null) {
|
||||
dbcursor.moveToFirst();
|
||||
@@ -2889,6 +2907,7 @@ public class GSKOrangeDB extends SQLiteOpenHelper {
|
||||
mp.setKEYACCOUNT_ID(dbcursor.getString(dbcursor.getColumnIndexOrThrow("KEYACCOUNT_ID")));
|
||||
mp.setSTORETYPE_ID(dbcursor.getString(dbcursor.getColumnIndexOrThrow("STORETYPE_ID")));
|
||||
mp.setCLASS_ID(dbcursor.getString(dbcursor.getColumnIndexOrThrow("CLASS_ID")));
|
||||
mp.setCATEGORY_ID(dbcursor.getString(dbcursor.getColumnIndexOrThrow("CATEGORY_ID")));
|
||||
mp.setPLANOGRAM_IMAGE(dbcursor.getString(dbcursor.getColumnIndexOrThrow("PLANOGRAM_IMAGE")));
|
||||
mp.setIMAGE_PATH(dbcursor.getString(dbcursor.getColumnIndexOrThrow("IMAGE_PATH")));
|
||||
|
||||
@@ -3024,8 +3043,6 @@ public class GSKOrangeDB extends SQLiteOpenHelper {
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
public ArrayList<AddittionalGetterSetter> getAdditionalMainStock(String store_id, String categoryId) {
|
||||
Cursor cursordata = null;
|
||||
ArrayList<AddittionalGetterSetter> productData = new ArrayList<AddittionalGetterSetter>();
|
||||
@@ -3094,7 +3111,7 @@ public class GSKOrangeDB extends SQLiteOpenHelper {
|
||||
values.put("DISPLAY", data.getDISPLAY().get(i));
|
||||
values.put("IMAGE_PATH", data.getIMAGE_PATH().get(i));
|
||||
values.put("IMAGE_URL", data.getIMAGE_URL().get(i));
|
||||
db.insert("ADDITIONAL_DISPLAY_MASTER", null, values);
|
||||
db.insert("ADDITIONAL_DISPLAY_MASTER", null, values);
|
||||
}
|
||||
} catch (Exception ex) {
|
||||
Log.d("Exception ", " ADDITIONAL_DISPLAY_MASTER " + ex.toString());
|
||||
@@ -3118,6 +3135,7 @@ public class GSKOrangeDB extends SQLiteOpenHelper {
|
||||
sb.setIMAGE_URL(cursordata.getString(cursordata.getColumnIndexOrThrow("IMAGE_URL")));
|
||||
sb.setIMAGE_PATH(cursordata.getString(cursordata.getColumnIndexOrThrow("IMAGE_PATH")));
|
||||
|
||||
|
||||
Data.add(sb);
|
||||
cursordata.moveToNext();
|
||||
}
|
||||
@@ -3134,8 +3152,4 @@ public class GSKOrangeDB extends SQLiteOpenHelper {
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -694,12 +694,25 @@ public class GeoTagActivity extends AppCompatActivity implements OnMapReadyCallb
|
||||
|
||||
} catch (SocketException ex) {
|
||||
ex.printStackTrace();
|
||||
Intent intent = new Intent(
|
||||
GeoTagActivity.this,
|
||||
GeoTagStoreList.class);
|
||||
|
||||
startActivity(intent);
|
||||
|
||||
GeoTagActivity.this.finish();
|
||||
|
||||
} catch (Exception ex) {
|
||||
|
||||
|
||||
ex.printStackTrace();
|
||||
Intent intent = new Intent(
|
||||
GeoTagActivity.this,
|
||||
GeoTagStoreList.class);
|
||||
|
||||
startActivity(intent);
|
||||
|
||||
GeoTagActivity.this.finish();
|
||||
}
|
||||
|
||||
|
||||
@@ -719,7 +732,7 @@ public class GeoTagActivity extends AppCompatActivity implements OnMapReadyCallb
|
||||
|
||||
new GeoTagImageUpload(GeoTagActivity.this).execute();
|
||||
|
||||
/* Intent intent = new Intent(
|
||||
/* Intent intent = new Intent(
|
||||
GeoTagActivity.this,
|
||||
GeoTagStoreList.class);
|
||||
|
||||
@@ -843,11 +856,29 @@ public class GeoTagActivity extends AppCompatActivity implements OnMapReadyCallb
|
||||
catch (SocketException ex) {
|
||||
|
||||
ex.printStackTrace();
|
||||
|
||||
Intent intent = new Intent(
|
||||
GeoTagActivity.this,
|
||||
GeoTagStoreList.class);
|
||||
|
||||
startActivity(intent);
|
||||
|
||||
GeoTagActivity.this.finish();
|
||||
|
||||
}
|
||||
|
||||
catch (Exception ex) {
|
||||
ex.printStackTrace();
|
||||
|
||||
|
||||
Intent intent = new Intent(
|
||||
GeoTagActivity.this,
|
||||
GeoTagStoreList.class);
|
||||
|
||||
startActivity(intent);
|
||||
|
||||
GeoTagActivity.this.finish();
|
||||
|
||||
}
|
||||
|
||||
return "";
|
||||
@@ -876,29 +907,44 @@ public class GeoTagActivity extends AppCompatActivity implements OnMapReadyCallb
|
||||
|
||||
db.updateDataStatus(geotaglistImage.get(i).getStoreid(), Statustag);
|
||||
|
||||
//db.deleteGeoTagData(geotaglistImage.get(i).getStoreid());
|
||||
db.deleteGeoTagData(geotaglistImage.get(i).getStoreid());
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
AlertMessage message = new AlertMessage(
|
||||
/* AlertMessage message = new AlertMessage(
|
||||
GeoTagActivity.this, getResources().getString(R.string.uploadeddata)
|
||||
+ result, getResources().getString(R.string.success), null);
|
||||
message.showMessage();
|
||||
message.showMessage();*/
|
||||
|
||||
Intent intent = new Intent(
|
||||
GeoTagActivity.this,
|
||||
GeoTagStoreList.class);
|
||||
|
||||
startActivity(intent);
|
||||
|
||||
GeoTagActivity.this.finish();
|
||||
|
||||
Toast.makeText(getApplicationContext(),getResources().getString(R.string.success),Toast.LENGTH_LONG).show();
|
||||
|
||||
}
|
||||
else if(!result.equals(CommonString.KEY_SUCCESS))
|
||||
{
|
||||
|
||||
AlertMessage message = new AlertMessage(
|
||||
/* AlertMessage message = new AlertMessage(
|
||||
GeoTagActivity.this, AlertMessage.MESSAGE_DATA_NOT
|
||||
+ result, getResources().getString(R.string.failure), null);
|
||||
message.showMessage();
|
||||
message.showMessage();*/
|
||||
Toast.makeText(getApplicationContext(),getResources().getString(R.string.failure),Toast.LENGTH_LONG).show();
|
||||
Intent intent = new Intent(
|
||||
GeoTagActivity.this,
|
||||
GeoTagStoreList.class);
|
||||
|
||||
startActivity(intent);
|
||||
|
||||
GeoTagActivity.this.finish();
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -80,7 +80,7 @@ public class NonWorkingReason extends AppCompatActivity implements
|
||||
protected void onCreate(Bundle savedInstanceState) {
|
||||
// TODO Auto-generated method stub
|
||||
super.onCreate(savedInstanceState);
|
||||
setContentView(R.layout.nonworking);
|
||||
setContentView(R.layout.nonworkingmainlayout);
|
||||
|
||||
reasonspinner = (Spinner) findViewById(R.id.spinner2);
|
||||
camera = (ImageButton) findViewById(R.id.imgcam);
|
||||
@@ -435,7 +435,7 @@ public class NonWorkingReason extends AppCompatActivity implements
|
||||
alert.show();
|
||||
|
||||
} else {
|
||||
Toast.makeText(getApplicationContext(), R.string.title_activity_select_dropdown,
|
||||
Toast.makeText(getApplicationContext(), R.string.pleaseenterRemarks,
|
||||
Toast.LENGTH_SHORT).show();
|
||||
}
|
||||
} else {
|
||||
|
||||
+39
-19
@@ -92,6 +92,7 @@ public class Stock_FacingActivity extends AppCompatActivity {
|
||||
Uri outputFileUri = null;
|
||||
String gallery_package = "";
|
||||
private SharedPreferences preferences;
|
||||
boolean isExpand = true;
|
||||
|
||||
private static boolean updateResources(Context context, String language) {
|
||||
|
||||
@@ -215,12 +216,14 @@ public class Stock_FacingActivity extends AppCompatActivity {
|
||||
public void onScroll(AbsListView view, int firstVisibleItem, int visibleItemCount, int totalItemCount) {
|
||||
int lastItem = firstVisibleItem + visibleItemCount;
|
||||
|
||||
if (firstVisibleItem == 0) {
|
||||
fab.setVisibility(View.VISIBLE);
|
||||
} else if (lastItem == totalItemCount) {
|
||||
fab.setVisibility(View.INVISIBLE);
|
||||
} else {
|
||||
fab.setVisibility(View.VISIBLE);
|
||||
if (isExpand) {
|
||||
if (firstVisibleItem == 0) {
|
||||
fab.setVisibility(View.VISIBLE);
|
||||
} else if (lastItem == totalItemCount) {
|
||||
fab.setVisibility(View.INVISIBLE);
|
||||
} else {
|
||||
fab.setVisibility(View.VISIBLE);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -256,6 +259,12 @@ public class Stock_FacingActivity extends AppCompatActivity {
|
||||
getCurrentFocus().clearFocus();
|
||||
}
|
||||
|
||||
if (groupPosition == 0) {
|
||||
isExpand = false;
|
||||
} else {
|
||||
isExpand = true;
|
||||
}
|
||||
|
||||
fab.setVisibility(View.INVISIBLE);
|
||||
}
|
||||
});
|
||||
@@ -271,6 +280,11 @@ public class Stock_FacingActivity extends AppCompatActivity {
|
||||
getCurrentFocus().clearFocus();
|
||||
}
|
||||
|
||||
if (groupPosition == 0) {
|
||||
isExpand = false;
|
||||
} else {
|
||||
isExpand = true;
|
||||
}
|
||||
fab.setVisibility(View.VISIBLE);
|
||||
}
|
||||
});
|
||||
@@ -692,6 +706,8 @@ public class Stock_FacingActivity extends AppCompatActivity {
|
||||
|
||||
//Planogram Dialog
|
||||
if (id == R.id.action_planogram) {
|
||||
expandableListView.clearFocus();
|
||||
|
||||
//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);
|
||||
@@ -700,11 +716,9 @@ public class Stock_FacingActivity extends AppCompatActivity {
|
||||
dialog.getWindow().setLayout(WindowManager.LayoutParams.MATCH_PARENT, WindowManager.LayoutParams.MATCH_PARENT);
|
||||
dialog.setCancelable(false);
|
||||
|
||||
ArrayList<MAPPING_PLANOGRAM_DataGetterSetter> mp = db.getMappingPlanogramData("");
|
||||
ArrayList<MAPPING_PLANOGRAM_DataGetterSetter> mappingPlanogramList = db.getMappingPlanogramData(categoryId);
|
||||
|
||||
//ImageView img_planogram = (ImageView) dialog.findViewById(R.id.img_planogram);
|
||||
setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_LANDSCAPE);
|
||||
|
||||
WebView webView = (WebView) dialog.findViewById(R.id.webview);
|
||||
webView.setWebViewClient(new MyWebViewClient());
|
||||
|
||||
@@ -712,22 +726,28 @@ public class Stock_FacingActivity extends AppCompatActivity {
|
||||
webView.getSettings().setJavaScriptEnabled(true);
|
||||
webView.getSettings().setBuiltInZoomControls(true);
|
||||
|
||||
String planogram_image = mp.get(0).getPLANOGRAM_IMAGE();
|
||||
if (new File(str + planogram_image).exists()) {
|
||||
Bitmap bmp = BitmapFactory.decodeFile(str + planogram_image);
|
||||
// img_planogram.setRotation(90);
|
||||
//img_planogram.setImageBitmap(bmp);
|
||||
String planogram_image = "";
|
||||
if (mappingPlanogramList.size() > 0) {
|
||||
planogram_image = mappingPlanogramList.get(0).getPLANOGRAM_IMAGE();
|
||||
}
|
||||
if (!planogram_image.equals("")) {
|
||||
if (new File(str + planogram_image).exists()) {
|
||||
Bitmap bmp = BitmapFactory.decodeFile(str + planogram_image);
|
||||
// img_planogram.setRotation(90);
|
||||
//img_planogram.setImageBitmap(bmp);
|
||||
setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_LANDSCAPE);
|
||||
|
||||
String imagePath = "file://" + CommonString.FILE_PATH + "/" + planogram_image;
|
||||
String html = "<html><head></head><body><img src=\"" + imagePath + "\"></body></html>";
|
||||
webView.loadDataWithBaseURL("", html, "text/html", "utf-8", "");
|
||||
String imagePath = "file://" + CommonString.FILE_PATH + "/" + planogram_image;
|
||||
String html = "<html><head></head><body><img src=\"" + imagePath + "\"></body></html>";
|
||||
webView.loadDataWithBaseURL("", html, "text/html", "utf-8", "");
|
||||
|
||||
dialog.show();
|
||||
} /*else {
|
||||
dialog.show();
|
||||
} /*else {
|
||||
//webView.loadUrl(String.valueOf(R.drawable.sad_cloud));
|
||||
|
||||
//img_planogram.setBackgroundResource(R.drawable.sad_cloud);
|
||||
}*/
|
||||
}
|
||||
|
||||
|
||||
ImageView cancel = (ImageView) dialog.findViewById(R.id.img_cancel);
|
||||
|
||||
@@ -58,7 +58,6 @@ public class AlertMessage {
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
public void ShowAlert1(String str) {
|
||||
|
||||
@@ -265,7 +265,7 @@ public class UploadActivity extends AppCompatActivity {
|
||||
SoapSerializationEnvelope envelope = new SoapSerializationEnvelope(SoapEnvelope.VER11);
|
||||
envelope.dotNet = true;
|
||||
envelope.setOutputSoapObject(request);
|
||||
|
||||
|
||||
HttpTransportSE androidHttpTransport = new HttpTransportSE(CommonString.URL);
|
||||
androidHttpTransport.call(CommonString.SOAP_ACTION_UPLOAD_STORE_COVERAGE, envelope);
|
||||
|
||||
@@ -345,21 +345,23 @@ public class UploadActivity extends AppCompatActivity {
|
||||
|
||||
|
||||
//Stock and Facing
|
||||
String stock_facing_xml = "";
|
||||
/*String stock_facing_xml = "";
|
||||
onXML = "";
|
||||
stock_facingHeaderList = db.getStockAndFacingHeaderServerUploadData(coverageList.get(i).getStoreId());
|
||||
|
||||
if (stock_facingHeaderList.size() > 0) {
|
||||
for (int i1 = 0; i1 < stock_facingHeaderList.size(); i1++) {
|
||||
String stockChildXML = "";
|
||||
|
||||
if (!stock_facingHeaderList.get(i1).getCategory_id().equals("0")) {
|
||||
|
||||
stock_facingChildList = db.getStockAndFacingSKUServerUploadData(
|
||||
stock_facingHeaderList.get(i1).getCategory_id(), stock_facingHeaderList.get(i1).getBrand_id());
|
||||
|
||||
String stockChildXML = "";
|
||||
String onXML1 = "";
|
||||
for (int j = 0; j < stock_facingChildList.size(); j++) {
|
||||
|
||||
stockChildXML = "[STOCK_FACING_DATA]"
|
||||
onXML1 = "[STOCK_FACING_DATA]"
|
||||
+ "[MID]" + mid + "[/MID]"
|
||||
+ "[USER_ID]" + userId + "[/USER_ID]"
|
||||
+ "[CATEGORY_ID]" + Integer.parseInt(stock_facingHeaderList.get(i1).getCategory_id()) + "[/CATEGORY_ID]"
|
||||
@@ -373,10 +375,64 @@ public class UploadActivity extends AppCompatActivity {
|
||||
+ "[FACEUP]" + Integer.parseInt(stock_facingChildList.get(j).getFacing()) + "[/FACEUP]"
|
||||
+ "[/STOCK_FACING_DATA]";
|
||||
|
||||
onXML = onXML + stockChildXML;
|
||||
stockChildXML = stockChildXML + onXML1;
|
||||
}
|
||||
stock_facing_xml = stock_facing_xml + onXML;
|
||||
}
|
||||
stock_facing_xml = stock_facing_xml + stockChildXML;
|
||||
}
|
||||
|
||||
final String sos_xml = "[DATA]" + stock_facing_xml + "[/DATA]";
|
||||
|
||||
request = new SoapObject(CommonString.NAMESPACE, CommonString.METHOD_UPLOAD_STOCK_XML_DATA);
|
||||
request.addProperty("XMLDATA", sos_xml);
|
||||
request.addProperty("KEYS", "STOCK_FACING_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 = 20;
|
||||
data.name = "Stock Facing Uploading";
|
||||
publishProgress(data);*/
|
||||
|
||||
String stock_facing_xml = "";
|
||||
onXML = "";
|
||||
stock_facingHeaderList = db.getStockAndFacingHeaderServerUploadData(coverageList.get(i).getStoreId());
|
||||
|
||||
if (stock_facingHeaderList.size() > 0) {
|
||||
|
||||
for (int i1 = 0; i1 < stock_facingHeaderList.size(); i1++) {
|
||||
onXML = "[STOCK_FACING_DATA]"
|
||||
+ "[MID]" + mid + "[/MID]"
|
||||
+ "[USER_ID]" + userId + "[/USER_ID]"
|
||||
+ "[BRAND_ID]" + Integer.parseInt(stock_facingHeaderList.get(i1).getBrand_id()) + "[/BRAND_ID]"
|
||||
+ "[IAMGE1]" + stock_facingHeaderList.get(i1).getImage1() + "[/IAMGE1]"
|
||||
+ "[IAMGE2]" + stock_facingHeaderList.get(i1).getImage2() + "[/IAMGE2]"
|
||||
+ "[SKU_ID]" + Integer.parseInt(stock_facingHeaderList.get(i1).getSku_id()) + "[/SKU_ID]"
|
||||
+ "[STOCK]" + Integer.parseInt(stock_facingHeaderList.get(i1).getStock()) + "[/STOCK]"
|
||||
+ "[FACEUP]" + Integer.parseInt(stock_facingHeaderList.get(i1).getFacing()) + "[/FACEUP]"
|
||||
+ "[/STOCK_FACING_DATA]";
|
||||
|
||||
stock_facing_xml = stock_facing_xml + onXML;
|
||||
}
|
||||
|
||||
final String sos_xml = "[DATA]" + stock_facing_xml + "[/DATA]";
|
||||
@@ -551,24 +607,24 @@ public class UploadActivity extends AppCompatActivity {
|
||||
|
||||
for (int k = 0; k < additionalVisibilitySkuList.size(); k++) {
|
||||
|
||||
onXMLdIALOG = "[VISIBILITY_DAILOG]"
|
||||
+ "[MID]" + mid + "[/MID]"
|
||||
+ "[USER_ID]"
|
||||
+ userId
|
||||
+ "[/USER_ID]"
|
||||
+ "[KEY_ID]"
|
||||
+ additionalVisibilitySkuList.get(k).getCOMMON_ID()
|
||||
+ "[/KEY_ID]"
|
||||
+ "[CATEGORY_ID]"
|
||||
+ additionalVisibilitySkuList.get(k).getCategoryId()
|
||||
+ "[/CATEGORY_ID]"
|
||||
+ "[SKU_ID]"
|
||||
+ additionalVisibilitySkuList.get(k).getSku_id()
|
||||
+ "[/SKU_ID]"
|
||||
+ "[QUANTITY]"
|
||||
+ additionalVisibilitySkuList.get(k).getQuantity()
|
||||
+ "[/QUANTITY]"
|
||||
+ "[/VISIBILITY_DAILOG]";
|
||||
onXMLdIALOG = "[VISIBILITY_DAILOG]"
|
||||
+ "[MID]" + mid + "[/MID]"
|
||||
+ "[USER_ID]"
|
||||
+ userId
|
||||
+ "[/USER_ID]"
|
||||
+ "[KEY_ID]"
|
||||
+ additionalVisibilitySkuList.get(k).getCOMMON_ID()
|
||||
+ "[/KEY_ID]"
|
||||
+ "[CATEGORY_ID]"
|
||||
+ additionalVisibilitySkuList.get(k).getCategoryId()
|
||||
+ "[/CATEGORY_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;
|
||||
|
||||
@@ -604,11 +660,11 @@ public class UploadActivity extends AppCompatActivity {
|
||||
+ "[/ADDITIONAL_VISIBILITY_DATA]";
|
||||
|
||||
|
||||
additional_visibility_data_xml = additional_visibility_data_xml + onXML;
|
||||
KeyID="";
|
||||
additionalVisibilitySkuList.clear();
|
||||
additional_visibility_data_xml = additional_visibility_data_xml + onXML;
|
||||
KeyID = "";
|
||||
additionalVisibilitySkuList.clear();
|
||||
|
||||
additional_visibility_dialog_xml="";
|
||||
additional_visibility_dialog_xml = "";
|
||||
|
||||
}
|
||||
|
||||
@@ -986,12 +1042,32 @@ public class UploadActivity extends AppCompatActivity {
|
||||
super.onPostExecute(result);
|
||||
|
||||
dialog.dismiss();
|
||||
db.deleteAllTables();
|
||||
if (result.equals("")) {
|
||||
|
||||
showAlert(getString(R.string.menu_upload_data));
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public void showAlert(String str) {
|
||||
AlertDialog.Builder builder = new AlertDialog.Builder(UploadActivity.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();*/
|
||||
finish();
|
||||
}
|
||||
});
|
||||
AlertDialog alert = builder.create();
|
||||
alert.show();
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
protected void onResume() {
|
||||
|
||||
+9
-1
@@ -7,7 +7,7 @@ import java.util.ArrayList;
|
||||
*/
|
||||
|
||||
public class MAPPING_PLANOGRAM_DataGetterSetter {
|
||||
String KEYACCOUNT_ID, STORETYPE_ID, CLASS_ID, PLANOGRAM_IMAGE, IMAGE_PATH;
|
||||
String KEYACCOUNT_ID, STORETYPE_ID, CLASS_ID, PLANOGRAM_IMAGE, IMAGE_PATH,CATEGORY_ID;
|
||||
|
||||
public String getKEYACCOUNT_ID() {
|
||||
return KEYACCOUNT_ID;
|
||||
@@ -48,4 +48,12 @@ public class MAPPING_PLANOGRAM_DataGetterSetter {
|
||||
public void setIMAGE_PATH(String IMAGE_PATH) {
|
||||
this.IMAGE_PATH = IMAGE_PATH;
|
||||
}
|
||||
|
||||
public String getCATEGORY_ID() {
|
||||
return CATEGORY_ID;
|
||||
}
|
||||
|
||||
public void setCATEGORY_ID(String CATEGORY_ID) {
|
||||
this.CATEGORY_ID = CATEGORY_ID;
|
||||
}
|
||||
}
|
||||
|
||||
+9
@@ -11,6 +11,7 @@ public class MAPPING_PLANOGRAM_MasterGetterSetter {
|
||||
|
||||
ArrayList<String> KEYACCOUNT_ID = new ArrayList<>();
|
||||
ArrayList<String> STORETYPE_ID = new ArrayList<>();
|
||||
ArrayList<String> CATEGORY_ID = new ArrayList<>();
|
||||
ArrayList<String> CLASS_ID = new ArrayList<>();
|
||||
ArrayList<String> PLANOGRAM_IMAGE = new ArrayList<>();
|
||||
ArrayList<String> IMAGE_PATH = new ArrayList<>();
|
||||
@@ -62,4 +63,12 @@ public class MAPPING_PLANOGRAM_MasterGetterSetter {
|
||||
public void setIMAGE_PATH(String IMAGE_PATH) {
|
||||
this.IMAGE_PATH.add(IMAGE_PATH);
|
||||
}
|
||||
|
||||
public ArrayList<String> getCATEGORY_ID() {
|
||||
return CATEGORY_ID;
|
||||
}
|
||||
|
||||
public void setCATEGORY_ID(String CATEGORY_ID) {
|
||||
this.CATEGORY_ID.add(CATEGORY_ID);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -696,6 +696,9 @@ public class XMLHandlers {
|
||||
if (xpp.getName().equals("CLASS_ID")) {
|
||||
st.setCLASS_ID(xpp.nextText());
|
||||
}
|
||||
if (xpp.getName().equals("CATEGORY_ID")) {
|
||||
st.setCATEGORY_ID(xpp.nextText());
|
||||
}
|
||||
if (xpp.getName().equals("PLANOGRAM_IMAGE")) {
|
||||
st.setPLANOGRAM_IMAGE(xpp.nextText());
|
||||
}
|
||||
|
||||
@@ -92,7 +92,7 @@
|
||||
android:layout_above="@+id/reasontxt"
|
||||
|
||||
android:paddingLeft="10dp"
|
||||
android:text="Remark"
|
||||
android:text="@string/Remark"
|
||||
android:textColor="@color/colorPrimary"
|
||||
android:textSize="18sp"
|
||||
android:textStyle="bold" />
|
||||
@@ -120,7 +120,7 @@
|
||||
android:layout_height="40sp"
|
||||
android:layout_centerInParent="true"
|
||||
android:background="@color/colorPrimary"
|
||||
android:text="SAVE"
|
||||
android:text="@string/save"
|
||||
android:textColor="#ffffff"
|
||||
android:textSize="17sp" />
|
||||
</RelativeLayout>
|
||||
|
||||
@@ -0,0 +1,28 @@
|
||||
<?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"
|
||||
tools:context="cpm.com.gskmtorange.dailyentry.NonWorkingReason">
|
||||
|
||||
<!--<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/nonworking" />
|
||||
|
||||
|
||||
|
||||
</android.support.design.widget.CoordinatorLayout>
|
||||
@@ -163,9 +163,19 @@
|
||||
<string name="uploadeddata">Veriler Paylaşılıyor ,</string>
|
||||
<string name="DataNot">Veriler Paylaşılmadı ,</string>
|
||||
<string name="delete">Sil</string>
|
||||
<string name="adddatatoclick">Click Yes To Add Data</string>
|
||||
<string name="adddatatoclick">Veri Eklemek İçin Evet tıklayın</string>
|
||||
<string name="displayname">Teşhir Türü</string>
|
||||
|
||||
<string name="storefront">Click Store Front Image</string>
|
||||
<string name="brandname">Brand Name</string>
|
||||
<string name="skuname">SKU Name</string>
|
||||
<string name="quantity">Teşhir Sayısı</string>
|
||||
<string name="title_activity_store_geotag">Coğrafi Konum</string>
|
||||
<string name="title_activity_store_list">Store List</string>
|
||||
<string name="Remark">Remark</string>
|
||||
<string name="pleaseenterRemarks">Please fill Remark</string>
|
||||
|
||||
|
||||
<!--Gagan start new code 2-->
|
||||
<string name="stock_facing_planogram_dialog_title">Örnek Fotoğraf</string>
|
||||
<string name="title_activity_settings">Ayarlar</string>
|
||||
|
||||
@@ -50,7 +50,7 @@
|
||||
<string name="select_language">Please select language</string>
|
||||
<string name="title_activity_select_language">Select Language</string>
|
||||
|
||||
<string name="title_activity_store_list_geotag">Store List</string>
|
||||
<string name="title_activity_store_list">Store List</string>
|
||||
|
||||
<string name="title_activity_store_geotag">Geo Tag</string>
|
||||
|
||||
@@ -216,6 +216,8 @@
|
||||
<string name="DataNot"> Data Not Uploaded ,</string>
|
||||
<string name="displayname">Display Name</string>
|
||||
<string name="adddatatoclick">Click Yes To Add Data</string>
|
||||
<string name="Remark">Remark</string>
|
||||
<string name="pleaseenterRemarks">Please fill Remark</string>
|
||||
|
||||
<string name="title_activity_service">Service</string>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user