|
|
@@ -58,17 +58,20 @@ public class UpdateActivity extends AppCompatActivity implements UpdateAdapter.U
|
|
|
private final static String OrderIDKey = "OrderID";
|
|
|
private final static String ActionIDKey = "ActionID";
|
|
|
private final static String ActionTitleKey = "ActionTitle";
|
|
|
+ private final static String OrderType2Key = "OrderType2";
|
|
|
+
|
|
|
private final static String SaveDataKey = "UpdateSavedJson";
|
|
|
private final static String SaveOrderIDKey = "UpdateSavedOrderID";
|
|
|
private final static String SaveActionIDKey = "UpdateSavedActionID";
|
|
|
private final static String SaveTitleKey = "UpdateSavedTitle";
|
|
|
+ private final static String SaveOrderType2Key = "UpdateSaveOrderType2";
|
|
|
|
|
|
private final static int REQUEST_SCANNER_CODE = 0;
|
|
|
private final static int REQUEST_CAMERA_CODE = 1;
|
|
|
private final static int REQUEST_PREVIEW_CODE = 2;
|
|
|
|
|
|
|
|
|
- public static Intent build(Context ctx, String orderID, int actionID,String actionTitle) {
|
|
|
+ public static Intent build(Context ctx, String orderID, int actionID,String actionTitle, String orderType2) {
|
|
|
|
|
|
Intent intent = new Intent(ctx, UpdateActivity.class);
|
|
|
if (orderID != null) {
|
|
|
@@ -77,6 +80,9 @@ public class UpdateActivity extends AppCompatActivity implements UpdateAdapter.U
|
|
|
if (actionTitle != null) {
|
|
|
intent.putExtra(ActionTitleKey,actionTitle);
|
|
|
}
|
|
|
+ if (orderType2 != null) {
|
|
|
+ intent.putExtra(OrderType2Key,orderType2);
|
|
|
+ }
|
|
|
intent.putExtra(ActionIDKey,actionID);
|
|
|
|
|
|
return intent;
|
|
|
@@ -85,6 +91,7 @@ public class UpdateActivity extends AppCompatActivity implements UpdateAdapter.U
|
|
|
private String mOrderID;
|
|
|
private String mTitle;
|
|
|
private int mActionID;
|
|
|
+ private String mOrderType2;
|
|
|
|
|
|
private Context mCtx = this;
|
|
|
private UpdateActivity self = this;
|
|
|
@@ -121,6 +128,7 @@ public class UpdateActivity extends AppCompatActivity implements UpdateAdapter.U
|
|
|
|
|
|
mOrderID = getIntent().getStringExtra(OrderIDKey);
|
|
|
mActionID = getIntent().getIntExtra(ActionIDKey,0);
|
|
|
+ mOrderType2 = getIntent().getStringExtra(OrderType2Key);
|
|
|
}
|
|
|
|
|
|
mHandler = new UpdateHandler(self);
|
|
|
@@ -152,6 +160,7 @@ public class UpdateActivity extends AppCompatActivity implements UpdateAdapter.U
|
|
|
|
|
|
mOrderID = savedInstanceState.getString(SaveOrderIDKey);
|
|
|
mActionID = savedInstanceState.getInt(SaveActionIDKey,0);
|
|
|
+ mOrderType2 = savedInstanceState.getString(SaveOrderType2Key);
|
|
|
|
|
|
String jsonStr = savedInstanceState.getString(SaveDataKey);
|
|
|
if (jsonStr != null) {
|
|
|
@@ -187,6 +196,9 @@ public class UpdateActivity extends AppCompatActivity implements UpdateAdapter.U
|
|
|
if (mTitle != null) {
|
|
|
outState.putString(SaveTitleKey, mTitle);
|
|
|
}
|
|
|
+ if (mOrderType2 != null) {
|
|
|
+ outState.putString(SaveOrderType2Key,mOrderType2);
|
|
|
+ }
|
|
|
outState.putInt(SaveActionIDKey, mActionID);
|
|
|
|
|
|
}
|
|
|
@@ -402,6 +414,9 @@ public class UpdateActivity extends AppCompatActivity implements UpdateAdapter.U
|
|
|
showProgressDialog();
|
|
|
|
|
|
Bundle params = new Bundle();
|
|
|
+ if (mOrderType2 != null) {
|
|
|
+ params.putString("orderType2",mOrderType2);
|
|
|
+ }
|
|
|
final ArrayList<UpdatePhotoModel> photoArr = prepareParams(params);
|
|
|
|
|
|
final Bundle finalParams = params;
|
|
|
@@ -468,6 +483,9 @@ public class UpdateActivity extends AppCompatActivity implements UpdateAdapter.U
|
|
|
|
|
|
Bundle fileParams = new Bundle();
|
|
|
fileParams.putString("serial",serial);
|
|
|
+ if (mOrderType2 != null) {
|
|
|
+ fileParams.putString("orderType2",mOrderType2);
|
|
|
+ }
|
|
|
|
|
|
JSONObject jsonObj = com.usai.redant.apexdrivers.Network.Network.uploadFile(model.photoPath,fileParams);
|
|
|
if (jsonObj != null) {
|
|
|
@@ -580,6 +598,9 @@ public class UpdateActivity extends AppCompatActivity implements UpdateAdapter.U
|
|
|
Bundle params = new Bundle();
|
|
|
params.putString("platform","android");
|
|
|
params.putString("serial", serial);
|
|
|
+ if (mOrderType2 != null) {
|
|
|
+ params.putString("orderType2",mOrderType2);
|
|
|
+ }
|
|
|
|
|
|
task.putBundle("params",params);
|
|
|
taskArr.add(task);
|