T2P upload data newss
This commit is contained in:
@@ -538,7 +538,7 @@ public class GSKOrangeDB extends SQLiteOpenHelper {
|
||||
values1.put(CommonString.KEY_COVERAGE_STATUS, status);
|
||||
|
||||
db.update(CommonString.KEY_JOURNEY_PLAN, values, CommonString.KEY_STORE_ID + "='" + id + "'", null);
|
||||
db.update(CommonString.TABLE_COVERAGE_DATA, values1, CommonString.KEY_STORE_ID + "='" + id + "'", null);
|
||||
//db.update(CommonString.TABLE_COVERAGE_DATA, values1, CommonString.KEY_STORE_ID + "='" + id + "'", null);
|
||||
|
||||
} catch (Exception ex) {
|
||||
|
||||
@@ -2925,15 +2925,16 @@ public class GSKOrangeDB extends SQLiteOpenHelper {
|
||||
}
|
||||
|
||||
//update out time
|
||||
public void updateCheckoutOuttime(String id, String out_time) {
|
||||
public void updateCheckoutOuttime(String id, String out_time, String status) {
|
||||
|
||||
ContentValues values = new ContentValues();
|
||||
|
||||
try {
|
||||
|
||||
values.put(CommonString.KEY_OUT_TIME, out_time);
|
||||
values.put(CommonString.KEY_COVERAGE_STATUS, status);
|
||||
|
||||
db.update(CommonString.KEY_JOURNEY_PLAN, values, CommonString.KEY_STORE_ID + "='" + id + "'", null);
|
||||
db.update(CommonString.TABLE_COVERAGE_DATA, values, CommonString.KEY_STORE_ID + "='" + id + "'", null);
|
||||
|
||||
} catch (Exception ex) {
|
||||
|
||||
|
||||
@@ -392,7 +392,7 @@ public class MainActivity extends AppCompatActivity
|
||||
public boolean isStoreCheckedIn() {
|
||||
|
||||
boolean result_flag = true;
|
||||
/*for (int i = 0; i < coverageList.size(); i++) {
|
||||
for (int i = 0; i < coverageList.size(); i++) {
|
||||
|
||||
String status = coverageList.get(i).getStatus();
|
||||
if (status.equals(CommonString.KEY_INVALID) || status.equals(CommonString.KEY_VALID)) {
|
||||
@@ -400,7 +400,7 @@ public class MainActivity extends AppCompatActivity
|
||||
error_msg = getResources().getString(R.string.title_store_list_checkout_current);
|
||||
break;
|
||||
}
|
||||
}*/
|
||||
}
|
||||
|
||||
return result_flag;
|
||||
}
|
||||
|
||||
@@ -170,27 +170,6 @@ public class CheckoutActivity extends AppCompatActivity {
|
||||
envelope);
|
||||
Object result = (Object) envelope.getResponse();
|
||||
|
||||
//temporary------------
|
||||
db.updateCheckoutOuttime(store_id, getCurrentTime());
|
||||
|
||||
SharedPreferences.Editor editor = preferences.edit();
|
||||
editor.putString(CommonString.KEY_STORE_ID, "");
|
||||
editor.putString(CommonString.KEY_STORE_NAME, "");
|
||||
editor.putString(CommonString.KEY_VISIT_DATE, "");
|
||||
editor.putString(CommonString.KEY_CAMERA_ALLOW, "");
|
||||
editor.putString(CommonString.KEY_CHECKOUT_STATUS, "");
|
||||
editor.putString(CommonString.KEY_CLASS_ID, "");
|
||||
editor.putString(CommonString.KEY_EMP_ID, "");
|
||||
editor.putString(CommonString.KEY_GEO_TAG, "");
|
||||
editor.putString(CommonString.KEY_KEYACCOUNT_ID, "");
|
||||
editor.putString(CommonString.KEY_STORETYPE_ID, "");
|
||||
editor.putString(CommonString.KEY_UPLOAD_STATUS, "");
|
||||
|
||||
editor.commit();
|
||||
|
||||
db.updateCheckoutStatus(store_id, CommonString.KEY_C);
|
||||
|
||||
|
||||
if (!result.toString().equalsIgnoreCase(
|
||||
CommonString.KEY_SUCCESS)) {
|
||||
return "Upload_Store_ChecOut_Status";
|
||||
@@ -214,9 +193,9 @@ public class CheckoutActivity extends AppCompatActivity {
|
||||
if (result.toString()
|
||||
.equalsIgnoreCase(CommonString.KEY_SUCCESS)) {
|
||||
|
||||
db.updateCheckoutOuttime(store_id, getCurrentTime());
|
||||
db.updateCheckoutOuttime(store_id, getCurrentTime(),CommonString.KEY_C);
|
||||
|
||||
editor = preferences.edit();
|
||||
SharedPreferences.Editor editor = preferences.edit();
|
||||
editor.putString(CommonString.KEY_STORE_ID, "");
|
||||
editor.putString(CommonString.KEY_STORE_NAME, "");
|
||||
editor.putString(CommonString.KEY_VISIT_DATE, "");
|
||||
|
||||
Reference in New Issue
Block a user