Merge pull request #61 from CPM-INDIA-SALES-AND-MARKETING-PVT-LTD/JioDataFree
Jio data free
This commit is contained in:
Generated
+1
-1
@@ -41,7 +41,7 @@
|
||||
<ConfirmationsSetting value="0" id="Add" />
|
||||
<ConfirmationsSetting value="0" id="Remove" />
|
||||
</component>
|
||||
<component name="ProjectRootManager" version="2" languageLevel="JDK_1_7" default="true" assert-keyword="true" jdk-15="true" project-jdk-name="1.8" project-jdk-type="JavaSDK">
|
||||
<component name="ProjectRootManager" version="2" languageLevel="JDK_1_8" default="true" assert-keyword="true" jdk-15="true" project-jdk-name="1.8" project-jdk-type="JavaSDK">
|
||||
<output url="file://$PROJECT_DIR$/build/classes" />
|
||||
</component>
|
||||
<component name="ProjectType">
|
||||
|
||||
@@ -2233,6 +2233,33 @@ public class GSKOrangeDB extends SQLiteOpenHelper {
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
public void deleteStockEntryMainTable(String storeid, String categoryid) {
|
||||
try {
|
||||
|
||||
db.delete(CommonString.TABLE_INSERT_STOCK_ADDITIONAL_MAIN, "Store_Id" + "='" + storeid + "'AND categoryId" + "='" + categoryid + "'", null);
|
||||
|
||||
db.delete(CommonString.TABLE_INSERT_STOCK_DIALOG_MAIN, "Store_Id" + "='" + storeid + "'AND categoryId" + "='" + categoryid + "'", null);
|
||||
|
||||
} catch (Exception e) {
|
||||
System.out.println("" + e);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
public ArrayList<BrandMasterGetterSetter> getBrandMasterData(String store_id) {
|
||||
Cursor cursordata = null;
|
||||
ArrayList<BrandMasterGetterSetter> Data = new ArrayList<BrandMasterGetterSetter>();
|
||||
|
||||
@@ -122,6 +122,9 @@ public class GeoTagActivity extends AppCompatActivity implements OnMapReadyCallb
|
||||
Uri outputFileUri;
|
||||
private int factor, k;
|
||||
ArrayList<GeotaggingBeans> geotaglist = new ArrayList<GeotaggingBeans>();
|
||||
|
||||
ArrayList<GeotaggingBeans> geotaglistImage = new ArrayList<GeotaggingBeans>();
|
||||
|
||||
private TextView percentage, message;
|
||||
private FailureGetterSetter failureGetterSetter = null;
|
||||
/**
|
||||
@@ -592,7 +595,7 @@ public class GeoTagActivity extends AppCompatActivity implements OnMapReadyCallb
|
||||
|
||||
for (int i = 0; i < geotaglist.size(); i++) {
|
||||
|
||||
runOnUiThread(new Runnable() {
|
||||
/* runOnUiThread(new Runnable() {
|
||||
public void run() {
|
||||
// TODO Auto-generated method stub
|
||||
k = k + factor;
|
||||
@@ -600,7 +603,7 @@ public class GeoTagActivity extends AppCompatActivity implements OnMapReadyCallb
|
||||
percentage.setText(k + "%");
|
||||
message.setText(getResources().getString(R.string.geotagdata));
|
||||
}
|
||||
});
|
||||
});*/
|
||||
|
||||
String onXML = "[GeoTag_DATA][STORE_ID]"
|
||||
+ geotaglist.get(i).getStoreid()
|
||||
@@ -619,7 +622,7 @@ public class GeoTagActivity extends AppCompatActivity implements OnMapReadyCallb
|
||||
|
||||
geo_xml = geo_xml + onXML;
|
||||
|
||||
geotemplist.add(geotaglist.get(i).getStoreid());
|
||||
// geotemplist.add(geotaglist.get(i).getStoreid());
|
||||
|
||||
}
|
||||
|
||||
@@ -649,10 +652,10 @@ public class GeoTagActivity extends AppCompatActivity implements OnMapReadyCallb
|
||||
CommonString.KEY_SUCCESS)) {
|
||||
String statusD = "D";
|
||||
|
||||
for (int i = 0; i < geotemplist.size(); i++) {
|
||||
db.updateGeoTagData(geotemplist.get(i).toString(), statusD);
|
||||
for (int i = 0; i < geotaglist.size(); i++) {
|
||||
db.updateGeoTagData(geotaglist.get(i).storeid, statusD);
|
||||
|
||||
db.updateDataStatus(geotemplist.get(i).toString(), statusD);
|
||||
db.updateDataStatus(geotaglist.get(i).getStoreid(), statusD);
|
||||
|
||||
}
|
||||
|
||||
@@ -716,13 +719,13 @@ public class GeoTagActivity extends AppCompatActivity implements OnMapReadyCallb
|
||||
|
||||
new GeoTagImageUpload(GeoTagActivity.this).execute();
|
||||
|
||||
Intent intent = new Intent(
|
||||
/* Intent intent = new Intent(
|
||||
GeoTagActivity.this,
|
||||
GeoTagStoreList.class);
|
||||
|
||||
startActivity(intent);
|
||||
|
||||
GeoTagActivity.this.finish();
|
||||
GeoTagActivity.this.finish();*/
|
||||
|
||||
}
|
||||
else if(!result.equals(CommonString.KEY_SUCCESS))
|
||||
@@ -777,7 +780,7 @@ public class GeoTagActivity extends AppCompatActivity implements OnMapReadyCallb
|
||||
db.open();
|
||||
|
||||
|
||||
geotaglist = db.getinsertGeotaggingData("D");
|
||||
geotaglistImage = db.getinsertGeotaggingData("D");
|
||||
|
||||
// Uploading Geotag
|
||||
|
||||
@@ -786,9 +789,9 @@ public class GeoTagActivity extends AppCompatActivity implements OnMapReadyCallb
|
||||
XMLReader xmlR = saxP.getXMLReader();
|
||||
|
||||
|
||||
if (geotaglist.size() > 0) {
|
||||
if (geotaglistImage.size() > 0) {
|
||||
|
||||
for (int i = 0; i < geotaglist.size(); i++) {
|
||||
for (int i = 0; i < geotaglistImage.size(); i++) {
|
||||
|
||||
runOnUiThread(new Runnable() {
|
||||
|
||||
@@ -801,18 +804,18 @@ public class GeoTagActivity extends AppCompatActivity implements OnMapReadyCallb
|
||||
}
|
||||
});
|
||||
|
||||
if (geotaglist.get(i).getUrl1() != null
|
||||
&& !geotaglist.get(i).getUrl1()
|
||||
if (geotaglistImage.get(i).getUrl1() != null
|
||||
&& !geotaglistImage.get(i).getUrl1()
|
||||
.equalsIgnoreCase("")) {
|
||||
|
||||
if (new File(Environment.getExternalStorageDirectory() + "/GSK_MT_ORANGE_IMAGES/"
|
||||
+ geotaglist.get(i).getUrl1()).exists()) {
|
||||
result = UploadGeoImage(geotaglist.get(i).getUrl1(), "GeoTag");
|
||||
+ geotaglistImage.get(i).getUrl1()).exists()) {
|
||||
result = UploadGeoImage(geotaglistImage.get(i).getUrl1(), "GeotagImages");
|
||||
|
||||
|
||||
if (!result.toString().equalsIgnoreCase(CommonString.KEY_SUCCESS)) {
|
||||
|
||||
return "GeoTag";
|
||||
return "GeotagImages";
|
||||
}
|
||||
|
||||
|
||||
@@ -825,25 +828,9 @@ public class GeoTagActivity extends AppCompatActivity implements OnMapReadyCallb
|
||||
return CommonString.METHOD_Get_DR_STORE_IMAGES_GEO + "," + errormsg;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/* runOnUiThread(new Runnable() {
|
||||
|
||||
public void run() {
|
||||
// TODO Auto-generated method stub
|
||||
|
||||
message.setText("Image1 Upload");
|
||||
}
|
||||
});*/
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// for(int i =0 ; i < geotaglist.size(); i++){
|
||||
|
||||
// }
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -882,16 +869,14 @@ public class GeoTagActivity extends AppCompatActivity implements OnMapReadyCallb
|
||||
String Statustag = "U";
|
||||
db.open();
|
||||
|
||||
for (int i = 0; i < geotaglist.size(); i++) {
|
||||
for (int i = 0; i < geotaglistImage.size(); i++) {
|
||||
|
||||
|
||||
db.updateGeoTagData(geotaglist.get(i).getStoreid(), Statustag);
|
||||
db.updateGeoTagData(geotaglistImage.get(i).getStoreid(), Statustag);
|
||||
|
||||
db.updateDataStatus(geotaglist.get(i).getStoreid(), Statustag);
|
||||
db.updateDataStatus(geotaglistImage.get(i).getStoreid(), Statustag);
|
||||
|
||||
// db.updateGeoTagDataInMain(geotaglist.get(i).getStoreid());
|
||||
|
||||
db.deleteGeoTagData(geotaglist.get(i).getStoreid());
|
||||
//db.deleteGeoTagData(geotaglistImage.get(i).getStoreid());
|
||||
|
||||
|
||||
}
|
||||
@@ -899,7 +884,7 @@ public class GeoTagActivity extends AppCompatActivity implements OnMapReadyCallb
|
||||
|
||||
|
||||
AlertMessage message = new AlertMessage(
|
||||
GeoTagActivity.this, AlertMessage.MESSAGE_ERROR
|
||||
GeoTagActivity.this, AlertMessage.MESSAGE_SUCCESS
|
||||
+ result, getResources().getString(R.string.success), null);
|
||||
message.showMessage();
|
||||
|
||||
@@ -958,8 +943,7 @@ public class GeoTagActivity extends AppCompatActivity implements OnMapReadyCallb
|
||||
byte[] ba = bao.toByteArray();
|
||||
String ba1 = Base64.encodeBytes(ba);
|
||||
|
||||
SoapObject request = new SoapObject(CommonString.NAMESPACE,
|
||||
CommonString.METHOD_Get_DR_POSM_IMAGES);
|
||||
SoapObject request = new SoapObject(CommonString.NAMESPACE, CommonString.METHOD_UPLOAD_IMAGE);
|
||||
|
||||
request.addProperty("img", ba1);
|
||||
request.addProperty("name", path);
|
||||
@@ -973,8 +957,7 @@ public class GeoTagActivity extends AppCompatActivity implements OnMapReadyCallb
|
||||
HttpTransportSE androidHttpTransport = new HttpTransportSE(
|
||||
CommonString.URL);
|
||||
|
||||
androidHttpTransport.call(
|
||||
CommonString.SOAP_ACTION_Get_DR_POSM_IMAGES, envelope);
|
||||
androidHttpTransport.call(CommonString.SOAP_ACTION_UPLOAD_IMAGE, envelope);
|
||||
Object result = (Object) envelope.getResponse();
|
||||
|
||||
if (result.toString().equalsIgnoreCase(CommonString.KEY_SUCCESS)) {
|
||||
|
||||
@@ -177,15 +177,15 @@ public class GeoTagStoreList extends AppCompatActivity implements View.OnClickLi
|
||||
}
|
||||
else if(current.getGEO_TAG().equalsIgnoreCase("D")){
|
||||
viewHolder.imageview.setVisibility(View.VISIBLE);
|
||||
viewHolder.imageview.setBackgroundResource(R.mipmap.tick_d);
|
||||
viewHolder.imageview.setBackgroundResource(R.mipmap.exclamation);
|
||||
}
|
||||
else if(current.getGEO_TAG().equalsIgnoreCase("U")){
|
||||
viewHolder.imageview.setVisibility(View.VISIBLE);
|
||||
viewHolder.imageview.setBackgroundResource(R.mipmap.tick_u);
|
||||
viewHolder.imageview.setBackgroundResource(R.mipmap.tick);
|
||||
}
|
||||
else if(current.getGEO_TAG().equalsIgnoreCase("P")){
|
||||
viewHolder.imageview.setVisibility(View.VISIBLE);
|
||||
viewHolder.imageview.setBackgroundResource(R.mipmap.tick_p);
|
||||
viewHolder.imageview.setBackgroundResource(R.mipmap.exclamation);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@@ -88,6 +88,7 @@ public class AdditionalVisibility extends AppCompatActivity implements View.OnCl
|
||||
String brand_name = "", brand_id = "", SKU_name = "", SKU_ID = "", brand_list_name = "", brand_list_id = "", sku_list_name = "", sku_list_id = "";
|
||||
public ListView listview;
|
||||
LinearLayout linearlay;
|
||||
CardView cardlay;
|
||||
ArrayList<BrandMasterGetterSetter> brandList;
|
||||
|
||||
ArrayList<BrandMasterGetterSetter> brand_list;
|
||||
@@ -278,6 +279,9 @@ public class AdditionalVisibility extends AppCompatActivity implements View.OnCl
|
||||
.setCancelable(false)
|
||||
.setPositiveButton(getResources().getString(R.string.yes), new DialogInterface.OnClickListener() {
|
||||
public void onClick(DialogInterface dialog, int id) {
|
||||
|
||||
db.deleteStockEntryMainTable(store_id,categoryId);
|
||||
|
||||
for (int J = 0; J < listdata.size(); J++) {
|
||||
newadd = new AddittionalGetterSetter();
|
||||
newadd.setBrand(listdata.get(J).getBrand_id());
|
||||
@@ -288,16 +292,11 @@ public class AdditionalVisibility extends AppCompatActivity implements View.OnCl
|
||||
newadd.setStore_id(listdata.get(J).getStore_id());
|
||||
newadd.setBtn_toogle(listdata.get(J).getBtn_toogle());
|
||||
newadd.setCategoryId(listdata.get(J).getCategoryId());
|
||||
|
||||
String KeyID = listdata.get(J).getKey_id();
|
||||
additionalVisibilitySkuList = db.getDialogStock(KeyID);
|
||||
|
||||
db.InsertMainListAdditionalData(newadd, additionalVisibilitySkuList,categoryId);
|
||||
|
||||
/*Intent in =new Intent(AdditionalVisibility.this, DailyDataMenuActivity.class);
|
||||
|
||||
startActivity(in);*/
|
||||
|
||||
KeyID="";
|
||||
additionalVisibilitySkuList.clear();
|
||||
}
|
||||
@@ -884,17 +883,26 @@ public class AdditionalVisibility extends AppCompatActivity implements View.OnCl
|
||||
Edt_txt = (EditText) dialog.findViewById(R.id.et_stock);
|
||||
listview = (ListView) dialog.findViewById(R.id.lv);
|
||||
linearlay = (LinearLayout) dialog.findViewById(R.id.list_layout);
|
||||
cardlay = (CardView) dialog.findViewById(R.id.cardId);
|
||||
|
||||
|
||||
//list = db.getDialogStock(store_id);
|
||||
|
||||
|
||||
if (defdata.size() > 0) {
|
||||
linearlay.setVisibility(View.VISIBLE);
|
||||
|
||||
cardlay.setVisibility(View.VISIBLE);
|
||||
adapterData = new MyAdaptorStock(AdditionalVisibility.this, defdata);
|
||||
listview.setAdapter(adapterData);
|
||||
listview.invalidateViews();
|
||||
} else {
|
||||
|
||||
linearlay.setVisibility(View.INVISIBLE);
|
||||
|
||||
cardlay.setVisibility(View.INVISIBLE);
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -957,6 +965,7 @@ public class AdditionalVisibility extends AppCompatActivity implements View.OnCl
|
||||
|
||||
// list = db.getDialogStock(store_id);
|
||||
linearlay.setVisibility(View.VISIBLE);
|
||||
cardlay.setVisibility(View.VISIBLE);
|
||||
adapterData = new MyAdaptorStock(AdditionalVisibility.this, defdata);
|
||||
listview.setAdapter(adapterData);
|
||||
listview.invalidateViews();
|
||||
|
||||
@@ -216,11 +216,19 @@ public class StoreListActivity extends AppCompatActivity {
|
||||
viewHolder.imageview.setBackgroundResource(R.mipmap.exclamation);
|
||||
viewHolder.chkbtn.setVisibility(View.INVISIBLE);
|
||||
} else if (current.getUPLOAD_STATUS().equalsIgnoreCase(CommonString.STORE_STATUS_LEAVE)) {
|
||||
|
||||
viewHolder.imageview.setVisibility(View.VISIBLE);
|
||||
viewHolder.imageview.setBackgroundResource(R.mipmap.exclamation);
|
||||
viewHolder.chkbtn.setVisibility(View.INVISIBLE);
|
||||
} else if (current.getCHECKOUT_STATUS().equalsIgnoreCase(CommonString.KEY_INVALID)) {
|
||||
}
|
||||
else if (checkleavestatus(storeid))
|
||||
{
|
||||
viewHolder.imageview.setVisibility(View.VISIBLE);
|
||||
viewHolder.imageview.setBackgroundResource(R.mipmap.exclamation);
|
||||
viewHolder.chkbtn.setVisibility(View.INVISIBLE);
|
||||
}
|
||||
|
||||
else if (current.getCHECKOUT_STATUS().equalsIgnoreCase(CommonString.KEY_INVALID)) {
|
||||
|
||||
if (coverage.size() > 0) {
|
||||
|
||||
@@ -276,9 +284,37 @@ public class StoreListActivity extends AppCompatActivity {
|
||||
Snackbar.make(v, R.string.title_store_list_activity_store_again_uploaded, Snackbar.LENGTH_LONG).setAction("Action", null).show();
|
||||
} else if (current.getUPLOAD_STATUS().equalsIgnoreCase(CommonString.KEY_L)) {
|
||||
Snackbar.make(v, R.string.title_store_list_activity_store_closed, Snackbar.LENGTH_LONG).setAction("Action", null).show();
|
||||
} else if (current.getUPLOAD_STATUS().equalsIgnoreCase(CommonString.STORE_STATUS_LEAVE)) {
|
||||
}
|
||||
else if (current.getUPLOAD_STATUS().equalsIgnoreCase(CommonString.STORE_STATUS_LEAVE)) {
|
||||
Snackbar.make(v, R.string.title_store_list_activity_already_store_closed, Snackbar.LENGTH_LONG).setAction("Action", null).show();
|
||||
} else {
|
||||
}
|
||||
else if (checkleavestatus(store_id)) {
|
||||
|
||||
Snackbar.make(v, R.string.title_store_list_activity_already_store_closed, Snackbar.LENGTH_LONG).setAction("Action", null).show();
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
/*{
|
||||
|
||||
for (int i = 0; i < coverage.size(); i++) {
|
||||
|
||||
if (coverage.get(i).getStoreId().equals(store_id)) {
|
||||
if (coverage.get(i).getStatus().equalsIgnoreCase(CommonString.STORE_STATUS_LEAVE)) {
|
||||
Snackbar.make(v, R.string.title_store_list_activity_already_store_closed, Snackbar.LENGTH_LONG).setAction("Action", null).show();
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
}*/
|
||||
|
||||
|
||||
|
||||
else {
|
||||
|
||||
// PUT IN PREFERENCES
|
||||
editor = preferences.edit();
|
||||
@@ -557,6 +593,34 @@ public class StoreListActivity extends AppCompatActivity {
|
||||
db.updateStoreStatus(storeid, storelist.get(0).getVISIT_DATE(), "N");
|
||||
|
||||
}
|
||||
|
||||
|
||||
public boolean checkleavestatus(String store_cd) {
|
||||
|
||||
if(coverage.size()>0)
|
||||
{
|
||||
|
||||
|
||||
for (int i = 0; i < coverage.size(); i++) {
|
||||
if (store_cd.equals(coverage.get(i).getStoreId())) {
|
||||
if (coverage.get(i).getStatus().equalsIgnoreCase(CommonString.STORE_STATUS_LEAVE)) {
|
||||
result_flag = true;
|
||||
break;
|
||||
}
|
||||
} else {
|
||||
|
||||
result_flag = false;
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
return result_flag;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -15,6 +15,8 @@ public class AlertMessage {
|
||||
|
||||
public static final String MESSAGE_ERROR = "Network Error , ";
|
||||
|
||||
public static final String MESSAGE_SUCCESS = "Uploaded Data , ";
|
||||
|
||||
public static final String MESSAGE_DATA_NOT = "Data Not Uploaded , ";
|
||||
|
||||
private Exception exception;
|
||||
|
||||
@@ -130,7 +130,7 @@
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:text="@string/cancel"/>
|
||||
android:text="@string/closed"/>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
@@ -148,12 +148,14 @@
|
||||
</android.support.v7.widget.CardView>
|
||||
|
||||
<android.support.v7.widget.CardView
|
||||
android:id="@+id/cardId"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="10dp"
|
||||
android:padding="10dp"
|
||||
card_view:cardBackgroundColor="@color/colorOrange"
|
||||
card_view:cardCornerRadius="20dp"
|
||||
android:visibility="gone"
|
||||
|
||||
>
|
||||
<LinearLayout
|
||||
|
||||
@@ -68,6 +68,7 @@
|
||||
android:layout_alignParentTop="true"
|
||||
android:focusable="false"
|
||||
android:background="@mipmap/checkout"
|
||||
android:visibility="gone"
|
||||
/>
|
||||
|
||||
<ImageView
|
||||
|
||||
Reference in New Issue
Block a user