AQL chart implementation
parent
a0b3bcce24
commit
79d7f16c67
|
@ -0,0 +1 @@
|
||||||
|
QualityChecker
|
|
@ -0,0 +1,10 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<project version="4">
|
||||||
|
<component name="deploymentTargetSelector">
|
||||||
|
<selectionStates>
|
||||||
|
<SelectionState runConfigName="app">
|
||||||
|
<option name="selectionMode" value="DROPDOWN" />
|
||||||
|
</SelectionState>
|
||||||
|
</selectionStates>
|
||||||
|
</component>
|
||||||
|
</project>
|
|
@ -0,0 +1,6 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<project version="4">
|
||||||
|
<component name="VcsDirectoryMappings">
|
||||||
|
<mapping directory="" vcs="Git" />
|
||||||
|
</component>
|
||||||
|
</project>
|
Binary file not shown.
|
@ -40,7 +40,7 @@
|
||||||
android:name=".ui.activities.MainActivity"
|
android:name=".ui.activities.MainActivity"
|
||||||
android:exported="true"
|
android:exported="true"
|
||||||
android:screenOrientation="portrait"
|
android:screenOrientation="portrait"
|
||||||
android:windowSoftInputMode="adjustResize">
|
android:windowSoftInputMode="stateHidden|adjustPan">
|
||||||
</activity>
|
</activity>
|
||||||
<activity
|
<activity
|
||||||
android:name=".ui.activities.HomeActivity"
|
android:name=".ui.activities.HomeActivity"
|
||||||
|
|
|
@ -5,6 +5,7 @@ import com.utopiaindustries.qualitychecker.models.InspectionCheckPoint;
|
||||||
import com.utopiaindustries.qualitychecker.models.InspectionCheckpointSku;
|
import com.utopiaindustries.qualitychecker.models.InspectionCheckpointSku;
|
||||||
import com.utopiaindustries.qualitychecker.models.InspectionDefect;
|
import com.utopiaindustries.qualitychecker.models.InspectionDefect;
|
||||||
import com.utopiaindustries.qualitychecker.models.InspectionDimension;
|
import com.utopiaindustries.qualitychecker.models.InspectionDimension;
|
||||||
|
import com.utopiaindustries.qualitychecker.models.InspectionLabelResponse;
|
||||||
import com.utopiaindustries.qualitychecker.models.InspectionReport;
|
import com.utopiaindustries.qualitychecker.models.InspectionReport;
|
||||||
import com.utopiaindustries.qualitychecker.models.InspectionReportItem;
|
import com.utopiaindustries.qualitychecker.models.InspectionReportItem;
|
||||||
import com.utopiaindustries.qualitychecker.models.ItemUnit;
|
import com.utopiaindustries.qualitychecker.models.ItemUnit;
|
||||||
|
@ -92,4 +93,7 @@ public interface ApiService {
|
||||||
|
|
||||||
@GET( "rest/uic/inspection-report/inspection-sku-checkpoints" )
|
@GET( "rest/uic/inspection-report/inspection-sku-checkpoints" )
|
||||||
Call<List<InspectionCheckpointSku>> fetchSkuCheckpoints( );
|
Call<List<InspectionCheckpointSku>> fetchSkuCheckpoints( );
|
||||||
|
|
||||||
|
@GET("rest/uic/inspection-report/get-inspection-label")
|
||||||
|
Call<InspectionLabelResponse> fetchAllInspectionLabels();
|
||||||
}
|
}
|
||||||
|
|
|
@ -19,8 +19,8 @@ import retrofit2.Retrofit;
|
||||||
import retrofit2.converter.gson.GsonConverterFactory;
|
import retrofit2.converter.gson.GsonConverterFactory;
|
||||||
|
|
||||||
public class RetrofitClient {
|
public class RetrofitClient {
|
||||||
private final static String BASE_URL = "https://portal.utopiaindustries.pk/uind/";
|
//private final static String BASE_URL = "https://portal.utopiaindustries.pk/uind/";
|
||||||
// private final static String BASE_URL = "http://192.168.90.27:8080/uind/";//"http://192.168.91.16:8080/uind/";
|
private final static String BASE_URL = "http://192.168.91.44:8081/uind/";//"http://192.168.91.44:8081/uind/";//"http://192.168.90.27:8080/uind/";//"http://192.168.91.16:8080/uind/";
|
||||||
|
|
||||||
private static Retrofit retrofit;
|
private static Retrofit retrofit;
|
||||||
|
|
||||||
|
|
|
@ -27,6 +27,21 @@ public class DatabaseHelper extends SQLiteOpenHelper {
|
||||||
public static final String PRODUCT_COLUMN_CATEGORY = "category";
|
public static final String PRODUCT_COLUMN_CATEGORY = "category";
|
||||||
public static final String PRODUCT_COLUMN_FNSKU = "fnsku";
|
public static final String PRODUCT_COLUMN_FNSKU = "fnsku";
|
||||||
|
|
||||||
|
//Table and Column for Inspection Label
|
||||||
|
public static final String INSPECTION_LABEL_TABLE_NAME = "inspection_label";
|
||||||
|
public static final String INSPECTION_LABEL_COLUMN_ID = "id";
|
||||||
|
public static final String INSPECTION_LABEL_COLUMN_MIN_LOT_SIZE = "minLotSize";
|
||||||
|
public static final String INSPECTION_LABEL_COLUMN_MAX_LOT_SIZE = "maxLotSize";
|
||||||
|
public static final String INSPECTION_LABEL_COLUMN_INSPECTION_LEVEL = "inspectionLevel";
|
||||||
|
public static final String INSPECTION_LABEL_COLUMN_SAMPLE_CODE = "sampleCode";
|
||||||
|
|
||||||
|
//Table and Column for Quality Label
|
||||||
|
public static final String QUALITY_LABEL_TABLE_NAME = "quality_label";
|
||||||
|
public static final String QUALITY_LABEL_COLUMN_ID = "id";
|
||||||
|
public static final String QUALITY_LABEL_COLUMN_SAMPLE_CODE = "sampleCode";
|
||||||
|
public static final String QUALITY_LABEL_COLUMN_SAMPLE_SIZE = "sampleSize";
|
||||||
|
public static final String QUALITY_LABEL_COLUMN_QUALITY_LEVEL = "qualityLevel";
|
||||||
|
public static final String QUALITY_LABEL_COLUMN_NO_ACCEPTED_DEFECTS = "noOfAcceptedDefects";
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* dimension table
|
* dimension table
|
||||||
|
@ -153,6 +168,22 @@ public class DatabaseHelper extends SQLiteOpenHelper {
|
||||||
CHECKPOINT_SKU_STANDARD + " TEXT," +
|
CHECKPOINT_SKU_STANDARD + " TEXT," +
|
||||||
"PRIMARY KEY (" + CHECKPOINT_SKU_SKU + ", " + CHECKPOINT_SKU_MARKETPLACE + ", " + CHECKPOINT_SKU_CHECKPOINT_ID + "))";
|
"PRIMARY KEY (" + CHECKPOINT_SKU_SKU + ", " + CHECKPOINT_SKU_MARKETPLACE + ", " + CHECKPOINT_SKU_CHECKPOINT_ID + "))";
|
||||||
|
|
||||||
|
String CREATE_INSPECTION_LABEL_TABLE = "CREATE TABLE " + INSPECTION_LABEL_TABLE_NAME + " (" +
|
||||||
|
INSPECTION_LABEL_COLUMN_ID + " INTEGER NOT NULL," +
|
||||||
|
INSPECTION_LABEL_COLUMN_MIN_LOT_SIZE + " INTEGER NOT NULL," +
|
||||||
|
INSPECTION_LABEL_COLUMN_MAX_LOT_SIZE + " INTEGER NOT NULL," +
|
||||||
|
INSPECTION_LABEL_COLUMN_INSPECTION_LEVEL + " INTEGER NOT NULL," +
|
||||||
|
INSPECTION_LABEL_COLUMN_SAMPLE_CODE + " TEXT NOT NULL )";
|
||||||
|
|
||||||
|
String CREATE_QUALITY_LABEL_TABLE = "CREATE TABLE " + QUALITY_LABEL_TABLE_NAME + " (" +
|
||||||
|
QUALITY_LABEL_COLUMN_ID + " INTEGER NOT NULL," +
|
||||||
|
QUALITY_LABEL_COLUMN_SAMPLE_CODE + " TEXT NOT NULL," +
|
||||||
|
QUALITY_LABEL_COLUMN_SAMPLE_SIZE + " INTEGER NOT NULL," +
|
||||||
|
QUALITY_LABEL_COLUMN_QUALITY_LEVEL + " REAL NOT NULL," +
|
||||||
|
QUALITY_LABEL_COLUMN_NO_ACCEPTED_DEFECTS + " INTEGER NOT NULL )";
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
db.execSQL( CREATE_PRODUCT_TABLE );
|
db.execSQL( CREATE_PRODUCT_TABLE );
|
||||||
db.execSQL( CREATE_INSPECTION_DIMENSION_TABLE );
|
db.execSQL( CREATE_INSPECTION_DIMENSION_TABLE );
|
||||||
db.execSQL( CREATE_CHECKPOINT_TABLE );
|
db.execSQL( CREATE_CHECKPOINT_TABLE );
|
||||||
|
@ -161,6 +192,8 @@ public class DatabaseHelper extends SQLiteOpenHelper {
|
||||||
db.execSQL( CREATE_REPORT_TABLE );
|
db.execSQL( CREATE_REPORT_TABLE );
|
||||||
db.execSQL( CREATE_DRAFT_REPORT_TABLE);
|
db.execSQL( CREATE_DRAFT_REPORT_TABLE);
|
||||||
db.execSQL( CREATE_SKU_CHECKPOINT_TABLE );
|
db.execSQL( CREATE_SKU_CHECKPOINT_TABLE );
|
||||||
|
db.execSQL( CREATE_INSPECTION_LABEL_TABLE );
|
||||||
|
db.execSQL( CREATE_QUALITY_LABEL_TABLE );
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -173,6 +206,8 @@ public class DatabaseHelper extends SQLiteOpenHelper {
|
||||||
db.execSQL( "DROP TABLE IF EXISTS " + REPORT_TABLE_NAME );
|
db.execSQL( "DROP TABLE IF EXISTS " + REPORT_TABLE_NAME );
|
||||||
db.execSQL( "DROP TABLE IF EXISTS " + DRAFT_REPORT_TABLE_NAME );
|
db.execSQL( "DROP TABLE IF EXISTS " + DRAFT_REPORT_TABLE_NAME );
|
||||||
db.execSQL( "DROP TABLE IF EXISTS " + CHECKPOINT_SKU_TABLE_NAME );
|
db.execSQL( "DROP TABLE IF EXISTS " + CHECKPOINT_SKU_TABLE_NAME );
|
||||||
|
db.execSQL( "DROP TABLE IF EXISTS " + INSPECTION_LABEL_TABLE_NAME );
|
||||||
|
db.execSQL( "DROP TABLE IF EXISTS " + QUALITY_LABEL_TABLE_NAME );
|
||||||
onCreate(db);
|
onCreate(db);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -0,0 +1,128 @@
|
||||||
|
package com.utopiaindustries.qualitychecker.db;
|
||||||
|
|
||||||
|
import static com.utopiaindustries.qualitychecker.db.DatabaseHelper.INSPECTION_LABEL_COLUMN_ID;
|
||||||
|
import static com.utopiaindustries.qualitychecker.db.DatabaseHelper.PRODUCT_COLUMN_ASIN;
|
||||||
|
import static com.utopiaindustries.qualitychecker.db.DatabaseHelper.QUALITY_LABEL_COLUMN_ID;
|
||||||
|
|
||||||
|
import android.content.ContentValues;
|
||||||
|
import android.content.Context;
|
||||||
|
import android.database.Cursor;
|
||||||
|
import android.database.sqlite.SQLiteDatabase;
|
||||||
|
|
||||||
|
import com.utopiaindustries.qualitychecker.models.InspectionLabel;
|
||||||
|
import com.utopiaindustries.qualitychecker.models.Product;
|
||||||
|
import com.utopiaindustries.qualitychecker.models.QualityLabel;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.concurrent.ExecutorService;
|
||||||
|
import java.util.concurrent.Executors;
|
||||||
|
|
||||||
|
public class InspectionLabelRepository {
|
||||||
|
private final DatabaseHelper dbHelper;
|
||||||
|
private final SQLiteDatabase database;
|
||||||
|
private final ExecutorService executorService;
|
||||||
|
|
||||||
|
|
||||||
|
public InspectionLabelRepository(Context context) {
|
||||||
|
dbHelper = new DatabaseHelper(context);
|
||||||
|
database = dbHelper.getWritableDatabase();
|
||||||
|
executorService = Executors.newSingleThreadExecutor();
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Insert list of inspection labels in batch
|
||||||
|
* */
|
||||||
|
public void insertInspectionLabels( List<InspectionLabel> inspectionLabels, List<QualityLabel> qualityLabels) {
|
||||||
|
executorService.execute(() -> {
|
||||||
|
database.beginTransaction();
|
||||||
|
try {
|
||||||
|
//Inspection Label
|
||||||
|
for (InspectionLabel inspectionLabel : inspectionLabels) {
|
||||||
|
ContentValues ivalues = new ContentValues();
|
||||||
|
ivalues.put(INSPECTION_LABEL_COLUMN_ID, inspectionLabel.getId());
|
||||||
|
ivalues.put(DatabaseHelper.INSPECTION_LABEL_COLUMN_MIN_LOT_SIZE, inspectionLabel.getMinLotSize());
|
||||||
|
ivalues.put(DatabaseHelper.INSPECTION_LABEL_COLUMN_MAX_LOT_SIZE, inspectionLabel.getMaxLotSize());
|
||||||
|
ivalues.put(DatabaseHelper.INSPECTION_LABEL_COLUMN_INSPECTION_LEVEL, inspectionLabel.getInspectionLevel());
|
||||||
|
ivalues.put(DatabaseHelper.INSPECTION_LABEL_COLUMN_SAMPLE_CODE, inspectionLabel.getSampleCode());
|
||||||
|
|
||||||
|
database.insertWithOnConflict(DatabaseHelper.INSPECTION_LABEL_TABLE_NAME, null, ivalues, SQLiteDatabase.CONFLICT_REPLACE);
|
||||||
|
}
|
||||||
|
|
||||||
|
//Quality Label
|
||||||
|
for (QualityLabel qualityLabel : qualityLabels) {
|
||||||
|
ContentValues qvalues = new ContentValues();
|
||||||
|
qvalues.put(QUALITY_LABEL_COLUMN_ID, qualityLabel.getId());
|
||||||
|
qvalues.put(DatabaseHelper.QUALITY_LABEL_COLUMN_SAMPLE_CODE, qualityLabel.getSampleCode());
|
||||||
|
qvalues.put(DatabaseHelper.QUALITY_LABEL_COLUMN_SAMPLE_SIZE, qualityLabel.getSampleSize());
|
||||||
|
qvalues.put(DatabaseHelper.QUALITY_LABEL_COLUMN_QUALITY_LEVEL, qualityLabel.getQualityLevel());
|
||||||
|
qvalues.put(DatabaseHelper.QUALITY_LABEL_COLUMN_NO_ACCEPTED_DEFECTS, qualityLabel.getNoOfAcceptedDefects());
|
||||||
|
|
||||||
|
database.insertWithOnConflict(DatabaseHelper.QUALITY_LABEL_TABLE_NAME, null, qvalues, SQLiteDatabase.CONFLICT_REPLACE);
|
||||||
|
}
|
||||||
|
|
||||||
|
database.setTransactionSuccessful();
|
||||||
|
} finally {
|
||||||
|
database.endTransaction();
|
||||||
|
close();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Get list of inspection labels from database
|
||||||
|
* */
|
||||||
|
public List<InspectionLabel> getInspectionLabels() {
|
||||||
|
List<InspectionLabel> inspectionLabels = new ArrayList<>();
|
||||||
|
Cursor cursor = database.query(DatabaseHelper.INSPECTION_LABEL_TABLE_NAME, new String[]{INSPECTION_LABEL_COLUMN_ID,
|
||||||
|
DatabaseHelper.INSPECTION_LABEL_COLUMN_MIN_LOT_SIZE, DatabaseHelper.INSPECTION_LABEL_COLUMN_MAX_LOT_SIZE,
|
||||||
|
DatabaseHelper.INSPECTION_LABEL_COLUMN_INSPECTION_LEVEL, DatabaseHelper.INSPECTION_LABEL_COLUMN_SAMPLE_CODE},
|
||||||
|
null, null, null, null, null);
|
||||||
|
if (cursor != null && cursor.moveToFirst()) {
|
||||||
|
do {
|
||||||
|
InspectionLabel inspectionLabel = new InspectionLabel();
|
||||||
|
inspectionLabel.setId(cursor.getInt(0));
|
||||||
|
inspectionLabel.setMinLotSize(cursor.getInt(1));
|
||||||
|
inspectionLabel.setMaxLotSize(cursor.getInt(2));
|
||||||
|
inspectionLabel.setInspectionLevel(cursor.getInt(3));
|
||||||
|
inspectionLabel.setSampleCode(cursor.getString(4));
|
||||||
|
inspectionLabels.add(inspectionLabel);
|
||||||
|
} while (cursor.moveToNext());
|
||||||
|
cursor.close();
|
||||||
|
}
|
||||||
|
return inspectionLabels;
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Get list of quality labels from database
|
||||||
|
* */
|
||||||
|
public List<QualityLabel> getQualityLabels() {
|
||||||
|
List<QualityLabel> qualityLabels = new ArrayList<>();
|
||||||
|
Cursor cursor = database.query(DatabaseHelper.QUALITY_LABEL_TABLE_NAME, new String[]{QUALITY_LABEL_COLUMN_ID,
|
||||||
|
DatabaseHelper.QUALITY_LABEL_COLUMN_SAMPLE_CODE, DatabaseHelper.QUALITY_LABEL_COLUMN_SAMPLE_SIZE,
|
||||||
|
DatabaseHelper.QUALITY_LABEL_COLUMN_QUALITY_LEVEL, DatabaseHelper.QUALITY_LABEL_COLUMN_NO_ACCEPTED_DEFECTS},
|
||||||
|
null, null, null, null, null);
|
||||||
|
if (cursor != null && cursor.moveToFirst()) {
|
||||||
|
do {
|
||||||
|
QualityLabel qualityLabel = new QualityLabel();
|
||||||
|
qualityLabel.setId(cursor.getInt(0));
|
||||||
|
qualityLabel.setSampleCode(cursor.getString(1));
|
||||||
|
qualityLabel.setSampleSize(cursor.getInt(2));
|
||||||
|
qualityLabel.setQualityLevel(cursor.getDouble(3));
|
||||||
|
qualityLabel.setNoOfAcceptedDefects(cursor.getInt(4));
|
||||||
|
qualityLabels.add(qualityLabel);
|
||||||
|
} while (cursor.moveToNext());
|
||||||
|
cursor.close();
|
||||||
|
}
|
||||||
|
return qualityLabels;
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Close the database
|
||||||
|
*/
|
||||||
|
public void close() {
|
||||||
|
dbHelper.close();
|
||||||
|
executorService.shutdown();
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,65 @@
|
||||||
|
|
||||||
|
package com.utopiaindustries.qualitychecker.models;
|
||||||
|
|
||||||
|
import com.google.gson.annotations.Expose;
|
||||||
|
import com.google.gson.annotations.SerializedName;
|
||||||
|
|
||||||
|
public class InspectionLabel {
|
||||||
|
|
||||||
|
@SerializedName("id")
|
||||||
|
@Expose
|
||||||
|
private Integer id;
|
||||||
|
@SerializedName("minLotSize")
|
||||||
|
@Expose
|
||||||
|
private Integer minLotSize;
|
||||||
|
@SerializedName("maxLotSize")
|
||||||
|
@Expose
|
||||||
|
private Integer maxLotSize;
|
||||||
|
@SerializedName("inspectionLevel")
|
||||||
|
@Expose
|
||||||
|
private Integer inspectionLevel;
|
||||||
|
@SerializedName("sampleCode")
|
||||||
|
@Expose
|
||||||
|
private String sampleCode;
|
||||||
|
|
||||||
|
public Integer getId() {
|
||||||
|
return id;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setId(Integer id) {
|
||||||
|
this.id = id;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Integer getMinLotSize() {
|
||||||
|
return minLotSize;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setMinLotSize(Integer minLotSize) {
|
||||||
|
this.minLotSize = minLotSize;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Integer getMaxLotSize() {
|
||||||
|
return maxLotSize;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setMaxLotSize(Integer maxLotSize) {
|
||||||
|
this.maxLotSize = maxLotSize;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Integer getInspectionLevel() {
|
||||||
|
return inspectionLevel;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setInspectionLevel(Integer inspectionLevel) {
|
||||||
|
this.inspectionLevel = inspectionLevel;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getSampleCode() {
|
||||||
|
return sampleCode;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setSampleCode(String sampleCode) {
|
||||||
|
this.sampleCode = sampleCode;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
|
@ -0,0 +1,33 @@
|
||||||
|
|
||||||
|
package com.utopiaindustries.qualitychecker.models;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
import com.google.gson.annotations.Expose;
|
||||||
|
import com.google.gson.annotations.SerializedName;
|
||||||
|
|
||||||
|
public class InspectionLabelResponse {
|
||||||
|
|
||||||
|
@SerializedName("qualityLabel")
|
||||||
|
@Expose
|
||||||
|
private List<QualityLabel> qualityLabel;
|
||||||
|
@SerializedName("inspectionLabel")
|
||||||
|
@Expose
|
||||||
|
private List<InspectionLabel> inspectionLabel;
|
||||||
|
|
||||||
|
public List<QualityLabel> getQualityLabel() {
|
||||||
|
return qualityLabel;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setQualityLabel(List<QualityLabel> qualityLabel) {
|
||||||
|
this.qualityLabel = qualityLabel;
|
||||||
|
}
|
||||||
|
|
||||||
|
public List<InspectionLabel> getInspectionLabel() {
|
||||||
|
return inspectionLabel;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setInspectionLabel(List<InspectionLabel> inspectionLabel) {
|
||||||
|
this.inspectionLabel = inspectionLabel;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
|
@ -31,12 +31,27 @@ public class InspectionReportItem implements Serializable {
|
||||||
private float packsSelected;
|
private float packsSelected;
|
||||||
private float piecesSelected;
|
private float piecesSelected;
|
||||||
|
|
||||||
private float checkedCartonsSelected;
|
private float cartonWeight;
|
||||||
private float checkedPacksSelected;
|
private float cartonLength;
|
||||||
private float checkedPiecesSelected;
|
private float cartonHeight;
|
||||||
|
private float cartonWidth;
|
||||||
|
private float packWeight;
|
||||||
|
private float packWidth;
|
||||||
|
private float packLength;
|
||||||
|
private float packHeight;
|
||||||
|
private long sampleSize;
|
||||||
|
private long inspectionLevel;
|
||||||
|
private long minorQualityLevel;
|
||||||
|
private long majorQualityLevel;
|
||||||
|
|
||||||
|
private int aqlSampleSize;
|
||||||
|
|
||||||
|
private int checkedCartonsSelected;
|
||||||
|
private int checkedPacksSelected;
|
||||||
|
private int checkedPiecesSelected;
|
||||||
|
|
||||||
private String packingDetails;
|
private String packingDetails;
|
||||||
private String sampleSize;
|
//private String sampleSize;
|
||||||
private String dateAdded;
|
private String dateAdded;
|
||||||
// wrapper
|
// wrapper
|
||||||
private List<InspectionItemCheckPoint> checkPoints;
|
private List<InspectionItemCheckPoint> checkPoints;
|
||||||
|
@ -236,11 +251,11 @@ public class InspectionReportItem implements Serializable {
|
||||||
this.piecesSelected = piecesSelected;
|
this.piecesSelected = piecesSelected;
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getSampleSize() {
|
public long getSampleSize() {
|
||||||
return sampleSize;
|
return sampleSize;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setSampleSize(String sampleSize) {
|
public void setSampleSize(long sampleSize) {
|
||||||
this.sampleSize = sampleSize;
|
this.sampleSize = sampleSize;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -260,34 +275,129 @@ public class InspectionReportItem implements Serializable {
|
||||||
this.fnsku = fnsku;
|
this.fnsku = fnsku;
|
||||||
}
|
}
|
||||||
|
|
||||||
public float getCheckedCartonsSelected() {
|
public int getCheckedCartonsSelected() {
|
||||||
return checkedCartonsSelected;
|
return checkedCartonsSelected;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setCheckedCartonsSelected(float checkedCartonsSelected) {
|
public void setCheckedCartonsSelected(int checkedCartonsSelected) {
|
||||||
this.checkedCartonsSelected = checkedCartonsSelected;
|
this.checkedCartonsSelected = checkedCartonsSelected;
|
||||||
}
|
}
|
||||||
|
|
||||||
public float getCheckedPacksSelected() {
|
public int getCheckedPacksSelected() {
|
||||||
return checkedPacksSelected;
|
return checkedPacksSelected;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setCheckedPacksSelected(float checkedPacksSelected) {
|
public void setCheckedPacksSelected(int checkedPacksSelected) {
|
||||||
this.checkedPacksSelected = checkedPacksSelected;
|
this.checkedPacksSelected = checkedPacksSelected;
|
||||||
}
|
}
|
||||||
|
|
||||||
public float getCheckedPiecesSelected() {
|
public int getCheckedPiecesSelected() {
|
||||||
return checkedPiecesSelected;
|
return checkedPiecesSelected;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setCheckedPiecesSelected(float checkedPiecesSelected) {
|
public void setCheckedPiecesSelected(int checkedPiecesSelected) {
|
||||||
this.checkedPiecesSelected = checkedPiecesSelected;
|
this.checkedPiecesSelected = checkedPiecesSelected;
|
||||||
}
|
}
|
||||||
|
|
||||||
@NonNull
|
public long getMajorQualityLevel() {
|
||||||
|
return majorQualityLevel;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setMajorQualityLevel(long majorQualityLevel) {
|
||||||
|
this.majorQualityLevel = majorQualityLevel;
|
||||||
|
}
|
||||||
|
|
||||||
|
public long getMinorQualityLevel() {
|
||||||
|
return minorQualityLevel;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setMinorQualityLevel(long minorQualityLevel) {
|
||||||
|
this.minorQualityLevel = minorQualityLevel;
|
||||||
|
}
|
||||||
|
|
||||||
|
public long getInspectionLevel() {
|
||||||
|
return inspectionLevel;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setInspectionLevel(long inspectionLevel) {
|
||||||
|
this.inspectionLevel = inspectionLevel;
|
||||||
|
}
|
||||||
|
|
||||||
|
public float getPackHeight() {
|
||||||
|
return packHeight;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setPackHeight(float packHeight) {
|
||||||
|
this.packHeight = packHeight;
|
||||||
|
}
|
||||||
|
|
||||||
|
public float getPackLength() {
|
||||||
|
return packLength;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setPackLength(float packLength) {
|
||||||
|
this.packLength = packLength;
|
||||||
|
}
|
||||||
|
|
||||||
|
public float getPackWidth() {
|
||||||
|
return packWidth;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setPackWidth(float packWidth) {
|
||||||
|
this.packWidth = packWidth;
|
||||||
|
}
|
||||||
|
|
||||||
|
public float getPackWeight() {
|
||||||
|
return packWeight;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setPackWeight(float packWeight) {
|
||||||
|
this.packWeight = packWeight;
|
||||||
|
}
|
||||||
|
|
||||||
|
public float getCartonWidth() {
|
||||||
|
return cartonWidth;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setCartonWidth(float cartonWidth) {
|
||||||
|
this.cartonWidth = cartonWidth;
|
||||||
|
}
|
||||||
|
|
||||||
|
public float getCartonHeight() {
|
||||||
|
return cartonHeight;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setCartonHeight(float cartonHeight) {
|
||||||
|
this.cartonHeight = cartonHeight;
|
||||||
|
}
|
||||||
|
|
||||||
|
public float getCartonLength() {
|
||||||
|
return cartonLength;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setCartonLength(float cartonLength) {
|
||||||
|
this.cartonLength = cartonLength;
|
||||||
|
}
|
||||||
|
|
||||||
|
public float getCartonWeight() {
|
||||||
|
return cartonWeight;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setCartonWeight(float cartonWeight) {
|
||||||
|
this.cartonWeight = cartonWeight;
|
||||||
|
}
|
||||||
|
|
||||||
|
public int getAqlSampleSize() {
|
||||||
|
return aqlSampleSize;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setAqlSampleSize(int aqlSampleSize) {
|
||||||
|
this.aqlSampleSize = aqlSampleSize;
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String toString() {
|
public String toString() {
|
||||||
return "InspectionAuditReportItem{" +
|
return "InspectionReportItem{" +
|
||||||
"id=" + id +
|
"id=" + id +
|
||||||
", reportId=" + reportId +
|
", reportId=" + reportId +
|
||||||
", asin='" + asin + '\'' +
|
", asin='" + asin + '\'' +
|
||||||
|
@ -301,8 +411,35 @@ public class InspectionReportItem implements Serializable {
|
||||||
", smColor='" + smColor + '\'' +
|
", smColor='" + smColor + '\'' +
|
||||||
", smSize='" + smSize + '\'' +
|
", smSize='" + smSize + '\'' +
|
||||||
", smItemName='" + smItemName + '\'' +
|
", smItemName='" + smItemName + '\'' +
|
||||||
|
", orderNumber='" + orderNumber + '\'' +
|
||||||
|
", article='" + article + '\'' +
|
||||||
|
", totalPresentPieces=" + totalPresentPieces +
|
||||||
|
", totalPresentPacks=" + totalPresentPacks +
|
||||||
|
", totalPresentCartons=" + totalPresentCartons +
|
||||||
|
", cartonsSelected=" + cartonsSelected +
|
||||||
|
", packsSelected=" + packsSelected +
|
||||||
|
", piecesSelected=" + piecesSelected +
|
||||||
|
", cartonWeight=" + cartonWeight +
|
||||||
|
", cartonLength=" + cartonLength +
|
||||||
|
", cartonHeight=" + cartonHeight +
|
||||||
|
", cartonWidth=" + cartonWidth +
|
||||||
|
", packWeight=" + packWeight +
|
||||||
|
", packWidth=" + packWidth +
|
||||||
|
", packLength=" + packLength +
|
||||||
|
", packHeight=" + packHeight +
|
||||||
|
", sampleSize=" + sampleSize +
|
||||||
|
", inspectionLevel=" + inspectionLevel +
|
||||||
|
", minorQualityLevel=" + minorQualityLevel +
|
||||||
|
", majorQualityLevel=" + majorQualityLevel +
|
||||||
|
", aqlSampleSize=" + aqlSampleSize +
|
||||||
|
", checkedCartonsSelected=" + checkedCartonsSelected +
|
||||||
|
", checkedPacksSelected=" + checkedPacksSelected +
|
||||||
|
", checkedPiecesSelected=" + checkedPiecesSelected +
|
||||||
|
", packingDetails='" + packingDetails + '\'' +
|
||||||
|
", dateAdded='" + dateAdded + '\'' +
|
||||||
", checkPoints=" + checkPoints +
|
", checkPoints=" + checkPoints +
|
||||||
", dimensions=" + dimensions +
|
", dimensions=" + dimensions +
|
||||||
|
", fnsku='" + fnsku + '\'' +
|
||||||
'}';
|
'}';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -0,0 +1,65 @@
|
||||||
|
|
||||||
|
package com.utopiaindustries.qualitychecker.models;
|
||||||
|
|
||||||
|
import com.google.gson.annotations.Expose;
|
||||||
|
import com.google.gson.annotations.SerializedName;
|
||||||
|
|
||||||
|
public class QualityLabel {
|
||||||
|
|
||||||
|
@SerializedName("id")
|
||||||
|
@Expose
|
||||||
|
private Integer id;
|
||||||
|
@SerializedName("sampleCode")
|
||||||
|
@Expose
|
||||||
|
private String sampleCode;
|
||||||
|
@SerializedName("sampleSize")
|
||||||
|
@Expose
|
||||||
|
private Integer sampleSize;
|
||||||
|
@SerializedName("qualityLevel")
|
||||||
|
@Expose
|
||||||
|
private Double qualityLevel;
|
||||||
|
@SerializedName("noOfAcceptedDefects")
|
||||||
|
@Expose
|
||||||
|
private Integer noOfAcceptedDefects;
|
||||||
|
|
||||||
|
public Integer getId() {
|
||||||
|
return id;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setId(Integer id) {
|
||||||
|
this.id = id;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getSampleCode() {
|
||||||
|
return sampleCode;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setSampleCode(String sampleCode) {
|
||||||
|
this.sampleCode = sampleCode;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Integer getSampleSize() {
|
||||||
|
return sampleSize;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setSampleSize(Integer sampleSize) {
|
||||||
|
this.sampleSize = sampleSize;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Double getQualityLevel() {
|
||||||
|
return qualityLevel;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setQualityLevel(Double qualityLevel) {
|
||||||
|
this.qualityLevel = qualityLevel;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Integer getNoOfAcceptedDefects() {
|
||||||
|
return noOfAcceptedDefects;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setNoOfAcceptedDefects(Integer noOfAcceptedDefects) {
|
||||||
|
this.noOfAcceptedDefects = noOfAcceptedDefects;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
|
@ -0,0 +1,5 @@
|
||||||
|
package com.utopiaindustries.qualitychecker.models.callback;
|
||||||
|
|
||||||
|
public interface SaveInspectionLabelCallBack extends SaveCallback {
|
||||||
|
|
||||||
|
}
|
|
@ -12,6 +12,7 @@ import com.utopiaindustries.qualitychecker.db.CheckpointRepository;
|
||||||
import com.utopiaindustries.qualitychecker.db.DefectRepository;
|
import com.utopiaindustries.qualitychecker.db.DefectRepository;
|
||||||
import com.utopiaindustries.qualitychecker.db.DimensionRepository;
|
import com.utopiaindustries.qualitychecker.db.DimensionRepository;
|
||||||
import com.utopiaindustries.qualitychecker.db.InspectionCheckpointSkuRepository;
|
import com.utopiaindustries.qualitychecker.db.InspectionCheckpointSkuRepository;
|
||||||
|
import com.utopiaindustries.qualitychecker.db.InspectionLabelRepository;
|
||||||
import com.utopiaindustries.qualitychecker.db.ItemRepository;
|
import com.utopiaindustries.qualitychecker.db.ItemRepository;
|
||||||
import com.utopiaindustries.qualitychecker.db.ProductRepository;
|
import com.utopiaindustries.qualitychecker.db.ProductRepository;
|
||||||
import com.utopiaindustries.qualitychecker.db.ReportRepository;
|
import com.utopiaindustries.qualitychecker.db.ReportRepository;
|
||||||
|
@ -21,6 +22,7 @@ import com.utopiaindustries.qualitychecker.models.InspectionDefect;
|
||||||
import com.utopiaindustries.qualitychecker.models.InspectionDimension;
|
import com.utopiaindustries.qualitychecker.models.InspectionDimension;
|
||||||
import com.utopiaindustries.qualitychecker.models.InspectionItemCheckPoint;
|
import com.utopiaindustries.qualitychecker.models.InspectionItemCheckPoint;
|
||||||
import com.utopiaindustries.qualitychecker.models.InspectionItemDefect;
|
import com.utopiaindustries.qualitychecker.models.InspectionItemDefect;
|
||||||
|
import com.utopiaindustries.qualitychecker.models.InspectionLabelResponse;
|
||||||
import com.utopiaindustries.qualitychecker.models.InspectionReport;
|
import com.utopiaindustries.qualitychecker.models.InspectionReport;
|
||||||
import com.utopiaindustries.qualitychecker.models.InspectionReportWrapper;
|
import com.utopiaindustries.qualitychecker.models.InspectionReportWrapper;
|
||||||
import com.utopiaindustries.qualitychecker.models.ItemUnit;
|
import com.utopiaindustries.qualitychecker.models.ItemUnit;
|
||||||
|
@ -29,6 +31,7 @@ import com.utopiaindustries.qualitychecker.models.callback.SaveCheckpointCallbac
|
||||||
import com.utopiaindustries.qualitychecker.models.callback.SaveDefectCallback;
|
import com.utopiaindustries.qualitychecker.models.callback.SaveDefectCallback;
|
||||||
import com.utopiaindustries.qualitychecker.models.callback.SaveDimensionCallback;
|
import com.utopiaindustries.qualitychecker.models.callback.SaveDimensionCallback;
|
||||||
import com.utopiaindustries.qualitychecker.models.callback.SaveDraftReportCallback;
|
import com.utopiaindustries.qualitychecker.models.callback.SaveDraftReportCallback;
|
||||||
|
import com.utopiaindustries.qualitychecker.models.callback.SaveInspectionLabelCallBack;
|
||||||
import com.utopiaindustries.qualitychecker.models.callback.SaveItemCallback;
|
import com.utopiaindustries.qualitychecker.models.callback.SaveItemCallback;
|
||||||
import com.utopiaindustries.qualitychecker.models.callback.SaveProductCallBack;
|
import com.utopiaindustries.qualitychecker.models.callback.SaveProductCallBack;
|
||||||
import com.utopiaindustries.qualitychecker.models.callback.SaveReportCallback;
|
import com.utopiaindustries.qualitychecker.models.callback.SaveReportCallback;
|
||||||
|
@ -275,6 +278,13 @@ public class InspectionReportService {
|
||||||
}).start();
|
}).start();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void fetchAndPopulateInspectionLabel( SaveInspectionLabelCallBack callback,
|
||||||
|
InspectionLabelRepository repository){
|
||||||
|
new Thread(() -> {
|
||||||
|
populateInspectionLabels( callback, repository );
|
||||||
|
}).start();
|
||||||
|
}
|
||||||
|
|
||||||
public void fetchAndPopulateDimensions( SaveDimensionCallback callback,
|
public void fetchAndPopulateDimensions( SaveDimensionCallback callback,
|
||||||
DimensionRepository repository ){
|
DimensionRepository repository ){
|
||||||
new Thread(() -> {
|
new Thread(() -> {
|
||||||
|
@ -338,6 +348,36 @@ public class InspectionReportService {
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void populateInspectionLabels( SaveInspectionLabelCallBack callback,
|
||||||
|
InspectionLabelRepository repository ){
|
||||||
|
apiService.fetchAllInspectionLabels().enqueue(
|
||||||
|
new Callback<InspectionLabelResponse>() {
|
||||||
|
@Override
|
||||||
|
public void onResponse(Call<InspectionLabelResponse> call,
|
||||||
|
Response<InspectionLabelResponse> response) {
|
||||||
|
if (response.isSuccessful()) {
|
||||||
|
try {
|
||||||
|
System.out.println( response.body() );
|
||||||
|
callback.onSuccess();
|
||||||
|
assert response.body() != null;
|
||||||
|
repository.insertInspectionLabels( response.body().getInspectionLabel(), response.body().getQualityLabel() );
|
||||||
|
} catch ( Exception ex ){
|
||||||
|
callback.onFailure(new Exception( ex.getMessage() ) );
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
callback.onFailure(new Exception("API call failed with status code: " + response.code()));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
@Override
|
||||||
|
public void onFailure(Call<InspectionLabelResponse> call, Throwable t) {
|
||||||
|
System.out.println(t);
|
||||||
|
callback.onFailure(t);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
private void populateDimensions( SaveDimensionCallback callback,
|
private void populateDimensions( SaveDimensionCallback callback,
|
||||||
DimensionRepository repository ){
|
DimensionRepository repository ){
|
||||||
|
|
||||||
|
|
|
@ -34,6 +34,7 @@ import com.utopiaindustries.qualitychecker.db.CheckpointRepository;
|
||||||
import com.utopiaindustries.qualitychecker.db.DefectRepository;
|
import com.utopiaindustries.qualitychecker.db.DefectRepository;
|
||||||
import com.utopiaindustries.qualitychecker.db.DimensionRepository;
|
import com.utopiaindustries.qualitychecker.db.DimensionRepository;
|
||||||
import com.utopiaindustries.qualitychecker.db.InspectionCheckpointSkuRepository;
|
import com.utopiaindustries.qualitychecker.db.InspectionCheckpointSkuRepository;
|
||||||
|
import com.utopiaindustries.qualitychecker.db.InspectionLabelRepository;
|
||||||
import com.utopiaindustries.qualitychecker.db.ItemRepository;
|
import com.utopiaindustries.qualitychecker.db.ItemRepository;
|
||||||
import com.utopiaindustries.qualitychecker.db.ProductRepository;
|
import com.utopiaindustries.qualitychecker.db.ProductRepository;
|
||||||
import com.utopiaindustries.qualitychecker.models.EmployeePhoto;
|
import com.utopiaindustries.qualitychecker.models.EmployeePhoto;
|
||||||
|
@ -41,6 +42,7 @@ import com.utopiaindustries.qualitychecker.models.InspectionReport;
|
||||||
import com.utopiaindustries.qualitychecker.models.callback.SaveCheckpointCallback;
|
import com.utopiaindustries.qualitychecker.models.callback.SaveCheckpointCallback;
|
||||||
import com.utopiaindustries.qualitychecker.models.callback.SaveDefectCallback;
|
import com.utopiaindustries.qualitychecker.models.callback.SaveDefectCallback;
|
||||||
import com.utopiaindustries.qualitychecker.models.callback.SaveDimensionCallback;
|
import com.utopiaindustries.qualitychecker.models.callback.SaveDimensionCallback;
|
||||||
|
import com.utopiaindustries.qualitychecker.models.callback.SaveInspectionLabelCallBack;
|
||||||
import com.utopiaindustries.qualitychecker.models.callback.SaveItemCallback;
|
import com.utopiaindustries.qualitychecker.models.callback.SaveItemCallback;
|
||||||
import com.utopiaindustries.qualitychecker.models.callback.SaveProductCallBack;
|
import com.utopiaindustries.qualitychecker.models.callback.SaveProductCallBack;
|
||||||
import com.utopiaindustries.qualitychecker.notification.NotificationHelper;
|
import com.utopiaindustries.qualitychecker.notification.NotificationHelper;
|
||||||
|
@ -195,6 +197,7 @@ public class HomeActivity extends AppCompatActivity implements View.OnClickListe
|
||||||
fetchAndPopulateDefectsData();
|
fetchAndPopulateDefectsData();
|
||||||
fetchAndPopulateUnitsData();
|
fetchAndPopulateUnitsData();
|
||||||
fetchAndPopulateSkuCheckpointsData();
|
fetchAndPopulateSkuCheckpointsData();
|
||||||
|
fetchAndPopulateInspectionLevelData();
|
||||||
} else {
|
} else {
|
||||||
Toast.makeText( this, "network not available", Toast.LENGTH_LONG ).show();
|
Toast.makeText( this, "network not available", Toast.LENGTH_LONG ).show();
|
||||||
}
|
}
|
||||||
|
@ -267,6 +270,36 @@ public class HomeActivity extends AppCompatActivity implements View.OnClickListe
|
||||||
}, new ProductRepository( this ) );
|
}, new ProductRepository( this ) );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* fetch and update inspection label
|
||||||
|
* */
|
||||||
|
private void fetchAndPopulateInspectionLevelData() {
|
||||||
|
|
||||||
|
NotificationHelper.showProductNotification(
|
||||||
|
this,
|
||||||
|
"Utopia QA App",
|
||||||
|
"Fetching Inspection Label.");
|
||||||
|
inspectionReportService.fetchAndPopulateInspectionLabel( new SaveInspectionLabelCallBack() {
|
||||||
|
@Override
|
||||||
|
public void onSuccess() {
|
||||||
|
Toast.makeText( HomeActivity.this, "Inspection Labels successfully synced", Toast.LENGTH_LONG ).show();
|
||||||
|
NotificationHelper.showProductNotification(
|
||||||
|
HomeActivity.this,
|
||||||
|
"Utopia QA App",
|
||||||
|
"Inspection Labels successfully synced");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onFailure(Throwable throwable) {
|
||||||
|
Toast.makeText( HomeActivity.this, "Error in Inspection Labels syncing " + throwable.getMessage(), Toast.LENGTH_LONG ).show();
|
||||||
|
NotificationHelper.showProductNotification(
|
||||||
|
HomeActivity.this,
|
||||||
|
"Utopia QA App",
|
||||||
|
"Error in Inspection Labels syncing" );
|
||||||
|
}
|
||||||
|
}, new InspectionLabelRepository( this ) );
|
||||||
|
}
|
||||||
|
|
||||||
private void fetchAndPopulateDimensionsData(){
|
private void fetchAndPopulateDimensionsData(){
|
||||||
|
|
||||||
NotificationHelper.showProductNotification( this,
|
NotificationHelper.showProductNotification( this,
|
||||||
|
|
|
@ -69,6 +69,8 @@ public class ReportAdapter extends
|
||||||
// Format the date in 12-hour format
|
// Format the date in 12-hour format
|
||||||
String formattedDateTime = displayDateFormat.format( date );
|
String formattedDateTime = displayDateFormat.format( date );
|
||||||
dateTv.setText( formattedDateTime );
|
dateTv.setText( formattedDateTime );
|
||||||
|
|
||||||
|
if (report.getReportResult() != null && !report.getReportResult().isEmpty()) {
|
||||||
if( report.getReportResult().equalsIgnoreCase("FAILED") ){
|
if( report.getReportResult().equalsIgnoreCase("FAILED") ){
|
||||||
status.setBackgroundResource( R.drawable.failed_bg );
|
status.setBackgroundResource( R.drawable.failed_bg );
|
||||||
}
|
}
|
||||||
|
@ -80,5 +82,7 @@ public class ReportAdapter extends
|
||||||
}
|
}
|
||||||
status.setText( report.getReportResult() );
|
status.setText( report.getReportResult() );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -8,6 +8,7 @@ import android.os.Handler;
|
||||||
import android.os.Looper;
|
import android.os.Looper;
|
||||||
import android.text.Editable;
|
import android.text.Editable;
|
||||||
import android.text.TextWatcher;
|
import android.text.TextWatcher;
|
||||||
|
import android.util.Log;
|
||||||
import android.view.LayoutInflater;
|
import android.view.LayoutInflater;
|
||||||
import android.view.View;
|
import android.view.View;
|
||||||
import android.view.ViewGroup;
|
import android.view.ViewGroup;
|
||||||
|
@ -65,11 +66,11 @@ public class ThirdStepFragment extends Fragment implements View.OnClickListener
|
||||||
private InspectionReportService inspectionReportService;
|
private InspectionReportService inspectionReportService;
|
||||||
private RecyclerView vocRecyclerView,itemDimensionsRecyclerView;
|
private RecyclerView vocRecyclerView,itemDimensionsRecyclerView;
|
||||||
private Store store;
|
private Store store;
|
||||||
private Spinner resultSpinner;
|
//private Spinner resultSpinner;
|
||||||
private ApiService apiService;
|
private ApiService apiService;
|
||||||
private EditText generalRemarks, etQualityAuditor, etProdRepresentative, etQcRepresentative;
|
private EditText generalRemarks, etQualityAuditor, etProdRepresentative, etQcRepresentative;
|
||||||
|
|
||||||
private TextView minorCountTv,majorCountTv,criticalCountTv;
|
private TextView minorCountTv,majorCountTv,criticalCountTv, resultStatus;
|
||||||
|
|
||||||
@Nullable
|
@Nullable
|
||||||
@Override
|
@Override
|
||||||
|
@ -268,6 +269,7 @@ public class ThirdStepFragment extends Fragment implements View.OnClickListener
|
||||||
Handler handler = new Handler(Looper.getMainLooper());
|
Handler handler = new Handler(Looper.getMainLooper());
|
||||||
handler.post(() -> {
|
handler.post(() -> {
|
||||||
|
|
||||||
|
Log.e("Report-ToString: ",""+store.getReport().toString());
|
||||||
SharedPreferences sharedPreferences = getContext().getSharedPreferences("login_prefs", Context.MODE_PRIVATE);
|
SharedPreferences sharedPreferences = getContext().getSharedPreferences("login_prefs", Context.MODE_PRIVATE);
|
||||||
long draftReportId = Long.parseLong(sharedPreferences.getString("draftReportId", null));
|
long draftReportId = Long.parseLong(sharedPreferences.getString("draftReportId", null));
|
||||||
|
|
||||||
|
@ -360,12 +362,12 @@ public class ThirdStepFragment extends Fragment implements View.OnClickListener
|
||||||
etProdRepresentative.setText(store.getReport().getProductionRepresentative());
|
etProdRepresentative.setText(store.getReport().getProductionRepresentative());
|
||||||
etQcRepresentative.setText(store.getReport().getQcRepresentative());
|
etQcRepresentative.setText(store.getReport().getQcRepresentative());
|
||||||
|
|
||||||
ArrayAdapter<String> adapter = new ArrayAdapter<>( getContext(),
|
/*ArrayAdapter<String> adapter = new ArrayAdapter<>( getContext(),
|
||||||
android.R.layout.simple_spinner_item,
|
android.R.layout.simple_spinner_item,
|
||||||
inspectionReportService.getReportResult() );
|
inspectionReportService.getReportResult() );
|
||||||
resultSpinner.setAdapter( adapter );
|
resultSpinner.setAdapter( adapter );*/
|
||||||
|
|
||||||
String defaultSelection = store.getReport().getReportResult();
|
/*String defaultSelection = store.getReport().getReportResult();
|
||||||
int defaultIndexResultIndex = inspectionReportService.getReportResult().indexOf( defaultSelection );
|
int defaultIndexResultIndex = inspectionReportService.getReportResult().indexOf( defaultSelection );
|
||||||
resultSpinner.setSelection( defaultIndexResultIndex );
|
resultSpinner.setSelection( defaultIndexResultIndex );
|
||||||
|
|
||||||
|
@ -380,7 +382,7 @@ public class ThirdStepFragment extends Fragment implements View.OnClickListener
|
||||||
public void onNothingSelected(AdapterView<?> parent) {
|
public void onNothingSelected(AdapterView<?> parent) {
|
||||||
|
|
||||||
}
|
}
|
||||||
});
|
});*/
|
||||||
|
|
||||||
minorCountTv.setText( String.valueOf(0) );
|
minorCountTv.setText( String.valueOf(0) );
|
||||||
majorCountTv.setText( String.valueOf(0) ) ;
|
majorCountTv.setText( String.valueOf(0) ) ;
|
||||||
|
@ -413,6 +415,19 @@ public class ThirdStepFragment extends Fragment implements View.OnClickListener
|
||||||
minorCountTv.setText( String.format("Minor : %d", minor ) );
|
minorCountTv.setText( String.format("Minor : %d", minor ) );
|
||||||
majorCountTv.setText( String.format("Major : %d", major ) ) ;
|
majorCountTv.setText( String.format("Major : %d", major ) ) ;
|
||||||
criticalCountTv.setText( String.format("Critical : %d", crirical ) );
|
criticalCountTv.setText( String.format("Critical : %d", crirical ) );
|
||||||
|
|
||||||
|
long minorInspection = store.getReport().getItems().get(0).getMinorQualityLevel();
|
||||||
|
long majorInspection = store.getReport().getItems().get(0).getMinorQualityLevel();
|
||||||
|
if((long) minor <= minorInspection
|
||||||
|
&& (long) major <= majorInspection
|
||||||
|
&& (long) crirical == 0) {
|
||||||
|
resultStatus.setText("Passed");
|
||||||
|
store.getReport().setReportResult( "Passed" );
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
resultStatus.setText("Failed");
|
||||||
|
store.getReport().setReportResult( "Failed" );
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -476,7 +491,8 @@ public class ThirdStepFragment extends Fragment implements View.OnClickListener
|
||||||
profileImage = view.findViewById( R.id.third_step_profile_image );
|
profileImage = view.findViewById( R.id.third_step_profile_image );
|
||||||
profileName = view.findViewById( R.id.third_profile_name );
|
profileName = view.findViewById( R.id.third_profile_name );
|
||||||
vocRecyclerView = view.findViewById( R.id.voc_recyclerview );
|
vocRecyclerView = view.findViewById( R.id.voc_recyclerview );
|
||||||
resultSpinner = view.findViewById( R.id.result_spinner );
|
// resultSpinner = view.findViewById( R.id.result_spinner );
|
||||||
|
resultStatus = view.findViewById( R.id.result_status);
|
||||||
generalRemarks = view.findViewById( R.id.general_remarks );
|
generalRemarks = view.findViewById( R.id.general_remarks );
|
||||||
itemDimensionsRecyclerView = view.findViewById( R.id.item_dimensions_recyclerview );
|
itemDimensionsRecyclerView = view.findViewById( R.id.item_dimensions_recyclerview );
|
||||||
minorCountTv = view.findViewById( R.id.minor_count );
|
minorCountTv = view.findViewById( R.id.minor_count );
|
||||||
|
|
|
@ -1,82 +1,70 @@
|
||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
|
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
xmlns:tools="http://schemas.android.com/tools"
|
||||||
|
android:id="@+id/scrollLayout"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:scrollbars="vertical"
|
|
||||||
android:scrollbarFadeDuration="0"
|
|
||||||
android:fadeScrollbars="false"
|
android:fadeScrollbars="false"
|
||||||
|
android:fillViewport="true"
|
||||||
|
android:scrollbarFadeDuration="0"
|
||||||
android:scrollbarThumbVertical="@android:color/darker_gray"
|
android:scrollbarThumbVertical="@android:color/darker_gray"
|
||||||
android:fillViewport="true">
|
android:paddingBottom="10dp"
|
||||||
|
android:paddingLeft="5dp"
|
||||||
|
android:paddingRight="5dp"
|
||||||
|
android:paddingTop="5dp"
|
||||||
|
android:scrollbars="vertical">
|
||||||
|
|
||||||
<androidx.constraintlayout.widget.ConstraintLayout
|
<LinearLayout
|
||||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
|
||||||
xmlns:tools="http://schemas.android.com/tools"
|
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginEnd="2dp"
|
|
||||||
tools:context=".ui.activities.LoginActivity">
|
|
||||||
|
|
||||||
<androidx.constraintlayout.widget.ConstraintLayout
|
android:orientation="vertical">
|
||||||
android:layout_width="806dp"
|
<!-- Your layout content here -->
|
||||||
android:layout_height="1150dp"
|
<RelativeLayout
|
||||||
app:layout_constraintBottom_toTopOf="@+id/relativeLayout"
|
android:id="@+id/firstLayout"
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
android:layout_width="match_parent"
|
||||||
app:layout_constraintHorizontal_bias="0.333"
|
android:layout_height="wrap_content"
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
android:padding="15dp">
|
||||||
app:layout_constraintTop_toTopOf="parent"
|
|
||||||
app:layout_constraintVertical_bias="0.0">
|
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/textView3"
|
android:id="@+id/textView3"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_alignParentStart="true"
|
||||||
|
android:layout_centerInParent="true"
|
||||||
|
android:layout_margin="20dp"
|
||||||
|
android:layout_marginLeft="10dp"
|
||||||
android:text="@string/screen_title"
|
android:text="@string/screen_title"
|
||||||
android:textColor="#000000"
|
android:textColor="#000000"
|
||||||
android:textSize="35sp"
|
android:textSize="35sp"
|
||||||
android:textStyle="bold"
|
android:textStyle="bold" />
|
||||||
app:layout_constraintBottom_toBottomOf="parent"
|
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
|
||||||
app:layout_constraintHorizontal_bias="0.054"
|
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
|
||||||
app:layout_constraintTop_toTopOf="parent"
|
|
||||||
app:layout_constraintVertical_bias="0.032" />
|
|
||||||
|
|
||||||
<ImageView
|
<ImageView
|
||||||
android:id="@+id/first_step_profile_image"
|
android:id="@+id/first_step_profile_image"
|
||||||
android:layout_width="93dp"
|
android:layout_width="93dp"
|
||||||
android:layout_height="86dp"
|
android:layout_height="86dp"
|
||||||
app:layout_constraintBottom_toBottomOf="parent"
|
android:layout_toLeftOf="@+id/first_step_name"
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
|
||||||
app:layout_constraintHorizontal_bias="0.367"
|
|
||||||
app:layout_constraintStart_toEndOf="@+id/textView3"
|
|
||||||
app:layout_constraintTop_toTopOf="parent"
|
|
||||||
app:layout_constraintVertical_bias="0.014"
|
|
||||||
tools:srcCompat="@tools:sample/avatars" />
|
tools:srcCompat="@tools:sample/avatars" />
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/first_step_name"
|
android:id="@+id/first_step_name"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_alignParentEnd="true"
|
||||||
|
android:layout_marginEnd="10dp"
|
||||||
|
android:text="Saif Ul haq"
|
||||||
android:textColor="#000000"
|
android:textColor="#000000"
|
||||||
android:textStyle="bold|italic"
|
android:textStyle="bold|italic" />
|
||||||
app:layout_constraintBottom_toBottomOf="parent"
|
</RelativeLayout>
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
|
||||||
app:layout_constraintHorizontal_bias="0.325"
|
|
||||||
app:layout_constraintStart_toEndOf="@+id/first_step_profile_image"
|
|
||||||
app:layout_constraintTop_toTopOf="parent"
|
|
||||||
app:layout_constraintVertical_bias="0.022" />
|
|
||||||
|
|
||||||
|
|
||||||
|
<!--Buttons for Step-1, Step-2, Step-3-->
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:id="@+id/linearLayout"
|
android:id="@+id/linearLayout"
|
||||||
android:layout_width="750dp"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="70dp"
|
android:layout_height="70dp"
|
||||||
android:orientation="horizontal"
|
android:layout_below="@+id/firstLayout"
|
||||||
app:layout_constraintBottom_toBottomOf="parent"
|
android:layout_margin="15dp"
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
android:orientation="horizontal">
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
|
||||||
app:layout_constraintTop_toTopOf="parent"
|
|
||||||
app:layout_constraintVertical_bias="0.119">
|
|
||||||
|
|
||||||
<Button
|
<Button
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
|
@ -102,19 +90,11 @@
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:layout_width="800dp"
|
android:id="@+id/lv3"
|
||||||
android:layout_height="950dp"
|
|
||||||
android:orientation="horizontal"
|
|
||||||
app:layout_constraintBottom_toBottomOf="parent"
|
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
|
||||||
app:layout_constraintHorizontal_bias="0.0"
|
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
|
||||||
app:layout_constraintTop_toTopOf="parent"
|
|
||||||
app:layout_constraintVertical_bias="1.0">
|
|
||||||
|
|
||||||
<ScrollView
|
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent">
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_below="@+id/linearLayout"
|
||||||
|
android:orientation="vertical">
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
|
@ -139,13 +119,7 @@
|
||||||
android:id="@+id/textView7"
|
android:id="@+id/textView7"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:text="@string/guide_line_text"
|
android:text="@string/guide_line_text" />
|
||||||
app:layout_constraintBottom_toBottomOf="parent"
|
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
|
||||||
app:layout_constraintHorizontal_bias="0.067"
|
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
|
||||||
app:layout_constraintTop_toBottomOf="@+id/guide_lne"
|
|
||||||
app:layout_constraintVertical_bias="0.008" />
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
<!-- inspection checkboxes-->
|
<!-- inspection checkboxes-->
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
|
@ -205,6 +179,7 @@
|
||||||
android:layout_width="400dp"
|
android:layout_width="400dp"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:hint="SKU"
|
android:hint="SKU"
|
||||||
|
android:imeOptions="actionNext"
|
||||||
android:inputType="text" />
|
android:inputType="text" />
|
||||||
|
|
||||||
<ImageButton
|
<ImageButton
|
||||||
|
@ -262,6 +237,80 @@
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:background="@drawable/box_border"
|
||||||
|
android:orientation="vertical">
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:weightSum="3"
|
||||||
|
android:layout_margin="5dp"
|
||||||
|
android:orientation="horizontal">
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_weight="1"
|
||||||
|
android:layout_margin="16dp"
|
||||||
|
android:text="Inspection Level"
|
||||||
|
android:textColor="@color/black"
|
||||||
|
android:textStyle="bold" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_weight="1"
|
||||||
|
android:layout_margin="16dp"
|
||||||
|
android:text="Quality Level Major"
|
||||||
|
android:textColor="@color/black"
|
||||||
|
android:textStyle="bold" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_weight="1"
|
||||||
|
android:layout_margin="16dp"
|
||||||
|
android:text="Quality Level Minor"
|
||||||
|
android:textColor="@color/black"
|
||||||
|
android:textStyle="bold" />
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:weightSum="3"
|
||||||
|
android:layout_margin="5dp"
|
||||||
|
android:orientation="horizontal">
|
||||||
|
|
||||||
|
<Spinner
|
||||||
|
android:id="@+id/sp_inspectionLevel"
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="45dp"
|
||||||
|
android:layout_weight="1"
|
||||||
|
android:layout_marginStart="16dp"/>
|
||||||
|
|
||||||
|
<Spinner
|
||||||
|
android:id="@+id/sp_qLevelMajor"
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="45dp"
|
||||||
|
android:layout_weight="1"
|
||||||
|
android:layout_marginLeft="5dp"/>
|
||||||
|
|
||||||
|
<Spinner
|
||||||
|
android:id="@+id/sp_qLevelMinor"
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="45dp"
|
||||||
|
android:layout_weight="1"
|
||||||
|
android:layout_marginStart="5dp"/>
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
|
@ -287,6 +336,7 @@
|
||||||
android:layout_width="250dp"
|
android:layout_width="250dp"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:hint="Box / Carton "
|
android:hint="Box / Carton "
|
||||||
|
android:imeOptions="actionNext"
|
||||||
android:inputType="numberDecimal" />
|
android:inputType="numberDecimal" />
|
||||||
|
|
||||||
<EditText
|
<EditText
|
||||||
|
@ -294,6 +344,7 @@
|
||||||
android:layout_width="250dp"
|
android:layout_width="250dp"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:hint="Packs (Item / box)"
|
android:hint="Packs (Item / box)"
|
||||||
|
android:imeOptions="actionNext"
|
||||||
android:inputType="numberDecimal" />
|
android:inputType="numberDecimal" />
|
||||||
|
|
||||||
<EditText
|
<EditText
|
||||||
|
@ -301,6 +352,7 @@
|
||||||
android:layout_width="250dp"
|
android:layout_width="250dp"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:hint="Pieces"
|
android:hint="Pieces"
|
||||||
|
android:imeOptions="actionNext"
|
||||||
android:inputType="numberDecimal" />
|
android:inputType="numberDecimal" />
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
|
@ -309,6 +361,7 @@
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_margin="16dp"
|
android:layout_margin="16dp"
|
||||||
|
android:imeOptions="actionNext"
|
||||||
android:hint="Packaging Details"
|
android:hint="Packaging Details"
|
||||||
android:inputType="text" />
|
android:inputType="text" />
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
@ -340,6 +393,7 @@
|
||||||
android:layout_width="250dp"
|
android:layout_width="250dp"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:hint="Box / Carton "
|
android:hint="Box / Carton "
|
||||||
|
android:imeOptions="actionNext"
|
||||||
android:inputType="numberDecimal" />
|
android:inputType="numberDecimal" />
|
||||||
|
|
||||||
<EditText
|
<EditText
|
||||||
|
@ -347,6 +401,7 @@
|
||||||
android:layout_width="250dp"
|
android:layout_width="250dp"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:hint="Packs (Item / box)"
|
android:hint="Packs (Item / box)"
|
||||||
|
android:imeOptions="actionNext"
|
||||||
android:inputType="numberDecimal" />
|
android:inputType="numberDecimal" />
|
||||||
|
|
||||||
<EditText
|
<EditText
|
||||||
|
@ -354,15 +409,26 @@
|
||||||
android:layout_width="250dp"
|
android:layout_width="250dp"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:hint="Pieces"
|
android:hint="Pieces"
|
||||||
|
android:imeOptions="actionNext"
|
||||||
android:inputType="numberDecimal" />
|
android:inputType="numberDecimal" />
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
<!--Item checked details-->
|
<!--Item checked details-->
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_margin="5dp"
|
android:layout_margin="5dp"
|
||||||
|
android:orientation="horizontal"
|
||||||
|
android:padding="5dp"
|
||||||
|
android:weightSum="1">
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_margin="2dp"
|
||||||
|
android:layout_weight="0.8"
|
||||||
android:background="@drawable/box_border"
|
android:background="@drawable/box_border"
|
||||||
android:orientation="vertical">
|
android:orientation="vertical">
|
||||||
|
|
||||||
|
@ -385,12 +451,14 @@
|
||||||
android:layout_width="250dp"
|
android:layout_width="250dp"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:hint="Box / Carton "
|
android:hint="Box / Carton "
|
||||||
|
android:imeOptions="actionNext"
|
||||||
android:inputType="numberDecimal" />
|
android:inputType="numberDecimal" />
|
||||||
|
|
||||||
<EditText
|
<EditText
|
||||||
android:id="@+id/item_per_box_selected"
|
android:id="@+id/item_per_box_selected"
|
||||||
android:layout_width="250dp"
|
android:layout_width="250dp"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
|
android:imeOptions="actionNext"
|
||||||
android:hint="Packs (Item / box)"
|
android:hint="Packs (Item / box)"
|
||||||
android:inputType="numberDecimal" />
|
android:inputType="numberDecimal" />
|
||||||
|
|
||||||
|
@ -399,48 +467,183 @@
|
||||||
android:layout_width="250dp"
|
android:layout_width="250dp"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:hint="Pieces"
|
android:hint="Pieces"
|
||||||
|
android:imeOptions="actionNext"
|
||||||
android:inputType="numberDecimal" />
|
android:inputType="numberDecimal" />
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
</LinearLayout>
|
|
||||||
<!-- <TextView-->
|
|
||||||
<!-- android:layout_width="wrap_content"-->
|
|
||||||
<!-- android:layout_height="wrap_content"-->
|
|
||||||
<!-- android:text="General Remarks"-->
|
|
||||||
<!-- android:textColor="@color/black"-->
|
|
||||||
<!-- android:textStyle="bold"-->
|
|
||||||
<!-- android:layout_margin="16dp" />-->
|
|
||||||
<!-- <EditText-->
|
|
||||||
<!-- android:id="@+id/general_remarks"-->
|
|
||||||
<!-- android:layout_width="match_parent"-->
|
|
||||||
<!-- android:layout_height="wrap_content"-->
|
|
||||||
<!-- android:hint="General Remarks"-->
|
|
||||||
<!-- android:layout_marginHorizontal="10dp"-->
|
|
||||||
<!-- android:layout_marginVertical="10dp"-->
|
|
||||||
<!-- android:inputType="text"/>-->
|
|
||||||
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
</ScrollView>
|
|
||||||
|
<RelativeLayout
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:layout_marginLeft="3dp"
|
||||||
|
android:layout_weight="0.2"
|
||||||
|
android:background="@drawable/box_border"
|
||||||
|
android:gravity="left"
|
||||||
|
android:orientation="vertical"
|
||||||
|
android:paddingStart="5dp"
|
||||||
|
android:paddingTop="16dp"
|
||||||
|
android:paddingBottom="8dp">
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_alignParentTop="true"
|
||||||
|
android:layout_marginLeft="2dp"
|
||||||
|
android:text="AQL Sample Size"
|
||||||
|
android:textColor="@color/black"
|
||||||
|
android:textStyle="bold" />
|
||||||
|
|
||||||
|
<EditText
|
||||||
|
android:id="@+id/et_aql_sample_size"
|
||||||
|
android:layout_width="200dp"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_alignParentBottom="true"
|
||||||
|
android:hint="AQL Sample Size"
|
||||||
|
android:imeOptions="actionNext"
|
||||||
|
android:inputType="numberDecimal" />
|
||||||
|
|
||||||
|
</RelativeLayout>
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/txtTesting"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:padding="5dp"
|
||||||
|
android:layout_margin="5dp"/>
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_margin="5dp"
|
||||||
|
android:background="@drawable/box_border"
|
||||||
|
android:orientation="vertical">
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_margin="16dp"
|
||||||
|
android:text="Carton Weight"
|
||||||
|
android:textColor="@color/black"
|
||||||
|
android:textStyle="bold" />
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginHorizontal="16dp"
|
||||||
|
android:orientation="horizontal"
|
||||||
|
android:paddingBottom="5dp">
|
||||||
|
|
||||||
|
<EditText
|
||||||
|
android:id="@+id/et_carton_weight"
|
||||||
|
android:layout_width="200dp"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:hint="Carton Weight"
|
||||||
|
android:imeOptions="actionNext"
|
||||||
|
android:inputType="numberDecimal" />
|
||||||
|
|
||||||
|
<EditText
|
||||||
|
android:id="@+id/et_carton_length"
|
||||||
|
android:layout_width="200dp"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:hint="Length"
|
||||||
|
android:imeOptions="actionNext"
|
||||||
|
android:inputType="numberDecimal" />
|
||||||
|
|
||||||
|
<EditText
|
||||||
|
android:id="@+id/et_carton_width"
|
||||||
|
android:layout_width="200dp"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:hint="width"
|
||||||
|
android:imeOptions="actionNext"
|
||||||
|
android:inputType="numberDecimal" />
|
||||||
|
|
||||||
|
<EditText
|
||||||
|
android:id="@+id/et_carton_height"
|
||||||
|
android:layout_width="200dp"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:hint="height"
|
||||||
|
android:imeOptions="actionNext"
|
||||||
|
android:inputType="numberDecimal" />
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_margin="5dp"
|
||||||
|
android:background="@drawable/box_border"
|
||||||
|
android:orientation="vertical">
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_margin="16dp"
|
||||||
|
android:text="Pack Weight"
|
||||||
|
android:textColor="@color/black"
|
||||||
|
android:textStyle="bold" />
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginHorizontal="16dp"
|
||||||
|
android:orientation="horizontal"
|
||||||
|
android:paddingBottom="5dp">
|
||||||
|
|
||||||
|
<EditText
|
||||||
|
android:id="@+id/et_pack_weight"
|
||||||
|
android:layout_width="200dp"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:hint="Pack Weight"
|
||||||
|
android:imeOptions="actionNext"
|
||||||
|
android:inputType="numberDecimal" />
|
||||||
|
|
||||||
|
<EditText
|
||||||
|
android:id="@+id/et_pack_length"
|
||||||
|
android:layout_width="200dp"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:hint="Length"
|
||||||
|
android:imeOptions="actionNext"
|
||||||
|
android:inputType="numberDecimal" />
|
||||||
|
|
||||||
|
<EditText
|
||||||
|
android:id="@+id/et_pack_width"
|
||||||
|
android:layout_width="200dp"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:hint="width"
|
||||||
|
android:imeOptions="actionNext"
|
||||||
|
android:inputType="numberDecimal" />
|
||||||
|
|
||||||
|
<EditText
|
||||||
|
android:id="@+id/et_pack_height"
|
||||||
|
android:layout_width="200dp"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:hint="height"
|
||||||
|
android:imeOptions="actionDone"
|
||||||
|
android:inputType="numberDecimal" />
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
|
|
||||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
<RelativeLayout
|
<RelativeLayout
|
||||||
android:id="@+id/relativeLayout"
|
android:id="@+id/relativeLayout"
|
||||||
android:layout_width="805dp"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="100dp"
|
android:layout_height="100dp"
|
||||||
app:layout_constraintBottom_toBottomOf="parent"
|
android:layout_below="@+id/lv3">
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
|
||||||
app:layout_constraintTop_toTopOf="parent"
|
|
||||||
app:layout_constraintVertical_bias="1.0">
|
|
||||||
|
|
||||||
<Button
|
<Button
|
||||||
android:id="@+id/button_right_frag_1"
|
android:id="@+id/button_right_frag_1"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_alignParentBottom="true"
|
|
||||||
android:layout_alignParentEnd="true"
|
android:layout_alignParentEnd="true"
|
||||||
|
android:layout_alignParentBottom="true"
|
||||||
android:layout_marginEnd="16dp"
|
android:layout_marginEnd="16dp"
|
||||||
android:layout_marginBottom="16dp"
|
android:layout_marginBottom="16dp"
|
||||||
android:backgroundTint="@color/light_blue"
|
android:backgroundTint="@color/light_blue"
|
||||||
|
@ -450,10 +653,10 @@
|
||||||
android:id="@+id/button_draft_first"
|
android:id="@+id/button_draft_first"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_toStartOf="@id/button_right_frag_1"
|
|
||||||
android:layout_alignParentBottom="true"
|
android:layout_alignParentBottom="true"
|
||||||
android:layout_marginEnd="16dp"
|
android:layout_marginEnd="16dp"
|
||||||
android:layout_marginBottom="16dp"
|
android:layout_marginBottom="16dp"
|
||||||
|
android:layout_toStartOf="@id/button_right_frag_1"
|
||||||
android:text="Draft" />
|
android:text="Draft" />
|
||||||
|
|
||||||
<Button
|
<Button
|
||||||
|
@ -474,5 +677,6 @@
|
||||||
android:layout_toStartOf="@id/button_left_frag_1"
|
android:layout_toStartOf="@id/button_left_frag_1"
|
||||||
android:text="History" />
|
android:text="History" />
|
||||||
</RelativeLayout>
|
</RelativeLayout>
|
||||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
|
||||||
|
</LinearLayout>
|
||||||
</ScrollView>
|
</ScrollView>
|
|
@ -331,13 +331,19 @@
|
||||||
android:padding="10dp"
|
android:padding="10dp"
|
||||||
android:layout_width="fill_parent"
|
android:layout_width="fill_parent"
|
||||||
android:layout_height="wrap_content">
|
android:layout_height="wrap_content">
|
||||||
<Spinner
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/result_status"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:hint="Result Status"
|
||||||
|
android:layout_weight="1"/>
|
||||||
|
<!--<Spinner
|
||||||
android:id="@+id/result_spinner"
|
android:id="@+id/result_spinner"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_weight="1"
|
android:layout_weight="1"
|
||||||
android:prompt="@string/spinner_title"
|
android:prompt="@string/spinner_title" />-->
|
||||||
/>
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/minor_count"
|
android:id="@+id/minor_count"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
|
|
|
@ -3,6 +3,7 @@
|
||||||
<domain-config cleartextTrafficPermitted="true">
|
<domain-config cleartextTrafficPermitted="true">
|
||||||
<!--<domain includeSubdomains="true">192.168.91.16</domain>-->
|
<!--<domain includeSubdomains="true">192.168.91.16</domain>-->
|
||||||
<domain includeSubdomains="true">192.168.90.27</domain>
|
<domain includeSubdomains="true">192.168.90.27</domain>
|
||||||
|
<domain includeSubdomains="true">192.168.91.44</domain>
|
||||||
<domain includeSubdomains="true">portal.utopiaindustries.pk</domain>
|
<domain includeSubdomains="true">portal.utopiaindustries.pk</domain>
|
||||||
<domain includeSubdomains="true">utopiaindustries.pk</domain>
|
<domain includeSubdomains="true">utopiaindustries.pk</domain>
|
||||||
</domain-config>
|
</domain-config>
|
||||||
|
|
Loading…
Reference in New Issue